History

Half user provided time_base once during the first frame when there is no timebase stored in the h264 stream. This should fix fate. (ffmpeg.c used pict_repeat with its default 1/25 timebase)

Originally committed as revision 17622 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer committed 17 years ago

Commit f56995b1 parent 26aedb41 file · +3 −0Browse files

Unified · Split

libavcodec/h264.c+3−0
@@ -3768,6 +3768,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 3767 unmodified lines
37683768 s->avctx->time_base.den *= 2;
37693769 av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den,
37703770 s->avctx->time_base.num, s->avctx->time_base.den, 1<<30);
3771+ }else if(!h->sps.time_scale && !s->avctx->frame_number){
3772+ s->avctx->time_base.den *=2;
3773+ h->sps.time_scale= s->avctx->time_base.den;
37713774 }
37723775 }
37733776

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t