ffmpeg: Do not use the data/size of a bitstream filter after failure
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jun 2015 11:27:39 +0000 (13:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jun 2015 11:50:02 +0000 (13:50 +0200)
Found-by: Rodger Combs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index f502998..1cf4487 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -650,6 +650,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
             if (!new_pkt.buf)
                 exit_program(1);
         } else if (a < 0) {
+            new_pkt = *pkt;
             av_log(NULL, AV_LOG_ERROR, "Failed to open bitstream filter %s for stream %d with codec %s",
                    bsfc->filter->name, pkt->stream_index,
                    avctx->codec ? avctx->codec->name : "copy");