diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-04-07 22:35:43 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-04-16 17:44:42 +0200 |
commit | f0a68a20a7761447c685a6c0c930a5ffdae11797 (patch) | |
tree | 1e50e0c57be26c8f1509b6fba8334f1bf47df30c /libavformat/electronicarts.c | |
parent | bd9430db691d519cf0ed3922007faa7c68a7c223 (diff) | |
download | ffmpeg-f0a68a20a7761447c685a6c0c930a5ffdae11797.tar.gz |
Enable header parsing for MPEG2VIDEO to get time-stamps.
FFmpeg can generate pts and dts on its own, but only
if we enable parsing, so do that.
This fixes ticket #46.
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r-- | libavformat/electronicarts.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 6585bbea2d..218e847f13 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -416,6 +416,9 @@ static int ea_read_header(AVFormatContext *s, ea->video_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = ea->video_codec; + // parsing is necessary to make FFmpeg generate correct timestamps + 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; st->codec->width = ea->width; |