Skip to content

Commit

Permalink
Merge pull request #105 from arrmo/cuvid-rmo
Browse files Browse the repository at this point in the history
cuvid updates
  • Loading branch information
erikkaashoek authored Mar 30, 2019
2 parents 7456466 + bcece6b commit 14dffb2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ depcomp
install-sh
missing
comskip.c.save-failed

# Eclipse IDE
.cproject
.project
2 changes: 1 addition & 1 deletion appveyor.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ test_script:
- SET PATH=C:\projects\comskip\ffmpeg-3.3.1-win64-shared/bin;%PATH%
- comskip ten-copy.mkv
- cat ten-copy.txt
- grep "9359\s17920" ten-copy.txt
- grep "9361\s17922" ten-copy.txt
3 changes: 3 additions & 0 deletions mpeg2dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,8 @@ static int prev_strange_framenum = 0;
// if (prev_frame_delay != 0.0 && frame_delay != prev_frame_delay)
// Debug(1, "Changing fps from %6.3f to %6.3f", 1.0/prev_frame_delay, 1.0/frame_delay);
pev_best_effort_timestamp = best_effort_timestamp;
if (use_cuvid)
av_frame_set_best_effort_timestamp(is->pFrame, is->pFrame->pkt_pts);
best_effort_timestamp = av_frame_get_best_effort_timestamp(is->pFrame);
calculated_delay = (best_effort_timestamp - pev_best_effort_timestamp) * av_q2d(is->video_st->time_base);

Expand Down Expand Up @@ -1731,6 +1733,7 @@ int stream_component_open(VideoState *is, int stream_index)
if (use_cuvid) {
if (codecCtx->codec_id == AV_CODEC_ID_MPEG2VIDEO && avcodec_find_decoder_by_name("mpeg2_cuvid") != NULL) codec_hw = avcodec_find_decoder_by_name("mpeg2_cuvid");
if (codecCtx->codec_id == AV_CODEC_ID_H264 && avcodec_find_decoder_by_name("h264_cuvid") != NULL) codec_hw = avcodec_find_decoder_by_name("h264_cuvid");
if (codecCtx->codec_id == AV_CODEC_ID_HEVC && avcodec_find_decoder_by_name("hevc_cuvid") != NULL) codec_hw = avcodec_find_decoder_by_name("hevc_cuvid");
if (codecCtx->codec_id == AV_CODEC_ID_MPEG4 && avcodec_find_decoder_by_name("mpeg4_cuvid") != NULL) codec_hw = avcodec_find_decoder_by_name("mpeg4_cuvid");
if (codecCtx->codec_id == AV_CODEC_ID_VC1 && avcodec_find_decoder_by_name("vc1_cuvidl") != NULL) codec_hw = avcodec_find_decoder_by_name("vc1_cuvidl");
}
Expand Down

0 comments on commit 14dffb2

Please sign in to comment.