[FFmpeg-cvslog] ffprobe: replace av_destruct_packet() with av_free_packet()

Stefano Sabatini git at videolan.org
Thu Jan 12 10:45:06 CET 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Thu Jan 12 00:16:21 2012 +0100| [7328c2fc2184476235ebc9a9b9247a986bdea1cf] | committer: Stefano Sabatini

ffprobe: replace av_destruct_packet() with av_free_packet()

av_destruct_packet() always frees the packet data even when the demuxer
is going to re-use it, thus causing crashes when decoding audio
frames (as implemented in a pending patch).

av_free_packet() is used instead, as it allows each demuxer to set the
right packet data releasing mechanism through the pkt->destruct callback.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7328c2fc2184476235ebc9a9b9247a986bdea1cf
---

 ffprobe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffprobe.c b/ffprobe.c
index be6ed19..44f2a15 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1349,7 +1349,7 @@ static void show_packets(WriterContext *w, AVFormatContext *fmt_ctx)
         if (do_show_frames &&
             get_video_frame(fmt_ctx, &frame, &pkt)) {
             show_frame(w, &frame, fmt_ctx->streams[pkt.stream_index]);
-            av_destruct_packet(&pkt);
+            av_free_packet(&pkt);
         }
     }
     av_init_packet(&pkt);



More information about the ffmpeg-cvslog mailing list