---
libavformat/utils.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 89f92ea..38fe6b6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -971,14 +971,10 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
- if ((ret = av_dup_packet(&out_pkt)) < 0)
+ if ((ret = av_packet_list_put(&s->parse_queue,
+ &s->parse_queue_end,
+ &out_pkt)) < 0)
goto fail;
-
- if (!add_to_pktbuf(&s->parse_queue, &out_pkt, &s->parse_queue_end)) {
- av_free_packet(&out_pkt);
- ret = AVERROR(ENOMEM);
- goto fail;
- }
}
@@ -1086,7 +1082,7 @@ static int read_frame_internal(AVFormatContext *s,
AVPacket *pkt)
}
if (!got_packet && s->parse_queue)
- ret = read_from_packet_buffer(&s->parse_queue, &s->parse_queue_end,
pkt);
+ ret = av_packet_list_get(&s->parse_queue, &s->parse_queue_end, pkt);
if(s->debug & FF_FDEBUG_TS)
av_log(s, AV_LOG_DEBUG, "read_frame_internal stream=%d, pts=%"PRId64",
dts=%"PRId64", size=%d, duration=%d, flags=%d\n",
--
1.8.3.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel