mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
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.
This commit is contained in:
parent
bd9430db69
commit
f0a68a20a7
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user