summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-02-26 23:47:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-02-26 23:47:32 +0000
commit3797c74ba5350692122a81db62a7bf2ce152f7fc (patch)
tree937ea6305b90b405b4760bcabf0d23de1379a869 /libavcodec/mpeg12.c
parent83569729d461d4a9465ad90d6a6e36eb2c358cb5 (diff)
Add ticks_per_frame, this should hopefully fix the regressions caused
by the time_base change. Originally committed as revision 17630 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 46d7946aaa..6988da22f6 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1269,7 +1269,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){
//MPEG-1 aspect
avctx->sample_aspect_ratio= av_d2q(
1.0/ff_mpeg1_aspect[s->aspect_ratio_info], 255);
-
+ avctx->ticks_per_frame=1;
}else{//MPEG-2
//MPEG-2 fps
av_reduce(
@@ -1278,6 +1278,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){
ff_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num*2,
ff_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
1<<30);
+ avctx->ticks_per_frame=2;
//MPEG-2 aspect
if(s->aspect_ratio_info > 1){
//we ignore the spec here as reality does not match the spec, see for example