Skip to content
Snippets Groups Projects
Commit 7328c2fc authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

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.
parent a8b0ece6
No related branches found
No related tags found
No related merge requests found
...@@ -1349,7 +1349,7 @@ static void show_packets(WriterContext *w, AVFormatContext *fmt_ctx) ...@@ -1349,7 +1349,7 @@ static void show_packets(WriterContext *w, AVFormatContext *fmt_ctx)
if (do_show_frames && if (do_show_frames &&
get_video_frame(fmt_ctx, &frame, &pkt)) { get_video_frame(fmt_ctx, &frame, &pkt)) {
show_frame(w, &frame, fmt_ctx->streams[pkt.stream_index]); show_frame(w, &frame, fmt_ctx->streams[pkt.stream_index]);
av_destruct_packet(&pkt); av_free_packet(&pkt);
} }
} }
av_init_packet(&pkt); av_init_packet(&pkt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment