---
I'll drop the documentation referring to non-refcounted avpacket if
everybody is ok with it, it collides with the other patches I have
pending so I'd rather reduce the number of conflicts I have to resolve
and do the change only once.
libavformat/utils.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f8926bd..fd96b9d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -413,6 +413,14 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
continue;
}
+ if (!pkt->buf) {
+ AVPacket tmp = { 0 };
+ ret = av_packet_ref(&tmp, pkt);
+ if (ret < 0)
+ return ret;
+ *pkt = tmp;
+ }
+
if ((s->flags & AVFMT_FLAG_DISCARD_CORRUPT) &&
(pkt->flags & AV_PKT_FLAG_CORRUPT)) {
av_log(s, AV_LOG_WARNING,
--
2.6.0.rc2.10.gf4d9753.dirty
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel