You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
avformat/utils: move side data merge after parser
merging before the parser can conflict with the parser, also future changes depend on it being done later Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -701,9 +701,6 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))
|
|
||||||
av_packet_merge_side_data(pkt);
|
|
||||||
|
|
||||||
if(pkt->stream_index >= (unsigned)s->nb_streams){
|
if(pkt->stream_index >= (unsigned)s->nb_streams){
|
||||||
av_log(s, AV_LOG_ERROR, "Invalid stream index %d\n", pkt->stream_index);
|
av_log(s, AV_LOG_ERROR, "Invalid stream index %d\n", pkt->stream_index);
|
||||||
continue;
|
continue;
|
||||||
@ -1401,6 +1398,9 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (!got_packet && s->parse_queue)
|
if (!got_packet && s->parse_queue)
|
||||||
ret = read_from_packet_buffer(&s->parse_queue, &s->parse_queue_end, pkt);
|
ret = read_from_packet_buffer(&s->parse_queue, &s->parse_queue_end, pkt);
|
||||||
|
|
||||||
|
if(ret >= 0 && !(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))
|
||||||
|
av_packet_merge_side_data(pkt);
|
||||||
|
|
||||||
if(s->debug & FF_FDEBUG_TS)
|
if(s->debug & FF_FDEBUG_TS)
|
||||||
av_log(s, AV_LOG_DEBUG, "read_frame_internal stream=%d, pts=%s, dts=%s, size=%d, duration=%d, flags=%d\n",
|
av_log(s, AV_LOG_DEBUG, "read_frame_internal stream=%d, pts=%s, dts=%s, size=%d, duration=%d, flags=%d\n",
|
||||||
pkt->stream_index,
|
pkt->stream_index,
|
||||||
|
Reference in New Issue
Block a user