aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-04-07 22:41:47 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-04-16 17:51:00 +0200
commit3c10843f15badfb300b32e77cb476a851641a0be (patch)
treecdf0a1a52e840fca255c6e0677783d2fec71cd75
parentf0a68a20a7761447c685a6c0c930a5ffdae11797 (diff)
downloadffmpeg-3c10843f15badfb300b32e77cb476a851641a0be.tar.gz
Use av_set_pts_info to set time_base.
Also remove useless assignments of 0, the priv context is initialized to 0.
-rw-r--r--libavformat/electronicarts.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 218e847f13..0b882aac87 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -330,12 +330,10 @@ static int process_ea_header(AVFormatContext *s) {
case MVIh_TAG :
ea->video_codec = CODEC_ID_CMV;
- ea->time_base = (AVRational){0,0};
break;
case kVGT_TAG:
ea->video_codec = CODEC_ID_TGV;
- ea->time_base = (AVRational){0,0};
break;
case mTCD_TAG :
@@ -420,7 +418,8 @@ static int ea_read_header(AVFormatContext *s,
if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO)
st->need_parsing = AVSTREAM_PARSE_HEADERS;
st->codec->codec_tag = 0; /* no fourcc */
- st->codec->time_base = ea->time_base;
+ if (ea->time_base.num)
+ av_set_pts_info(st, 64, ea->time_base.num, ea->time_base.den);
st->codec->width = ea->width;
st->codec->height = ea->height;
}