Skip to content

Commit

Permalink
lavf/utils: fix h264 packet duration when ticks_per_frame > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzhiqiang committed Jul 2, 2019
1 parent 99323d8 commit 23b7be7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libavformat/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -6239,6 +6239,9 @@ int av_try_find_stream_info(AVFormatContext *ic, AVDictionary **options) {
switch (st->codecpar->codec_type) {
case AVMEDIA_TYPE_VIDEO:
avctx[i] = create_video_decoder_from_codecpar(st->codecpar);
// fix when ticks_per_frame > 1
if (avctx[i])
st->r_frame_rate = avctx[i]->framerate;
break;
case AVMEDIA_TYPE_AUDIO:
avctx[i] = create_audio_decoder_from_codecpar(st->codecpar);
Expand Down

0 comments on commit 23b7be7

Please sign in to comment.