Commit 8f0f678f authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: Do not use the data/size of a bitstream filter after failure

Found-by: Rodger Combs
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 49038fc1
...@@ -650,6 +650,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) ...@@ -650,6 +650,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
if (!new_pkt.buf) if (!new_pkt.buf)
exit_program(1); exit_program(1);
} else if (a < 0) { } 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", av_log(NULL, AV_LOG_ERROR, "Failed to open bitstream filter %s for stream %d with codec %s",
bsfc->filter->name, pkt->stream_index, bsfc->filter->name, pkt->stream_index,
avctx->codec ? avctx->codec->name : "copy"); avctx->codec ? avctx->codec->name : "copy");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment