Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-21 04:02:55 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-21 04:37:32 +0300
commitac0ba6f233698f02ebb75b03242e94333dbe13d4 (patch)
tree72ee6a54896569a60030d652ec487fa967da32bc /ffmpeg.c
parent2bb54b82b5094fd906aa28c0443be08c95662a31 (diff)
ffmpeg: Check av_parser_change() for failure
No testcase known Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 530b3aa73e..c26b5811e6 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1866,10 +1866,15 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
&& ost->enc_ctx->codec_id != AV_CODEC_ID_MPEG2VIDEO
&& ost->enc_ctx->codec_id != AV_CODEC_ID_VC1
) {
- if (av_parser_change(ost->parser, ost->st->codec,
+ int ret = av_parser_change(ost->parser, ost->st->codec,
&opkt.data, &opkt.size,
pkt->data, pkt->size,
- pkt->flags & AV_PKT_FLAG_KEY)) {
+ pkt->flags & AV_PKT_FLAG_KEY);
+ if (ret < 0) {
+ av_log(NULL, AV_LOG_FATAL, "av_parser_change failed\n");
+ exit_program(1);
+ }
+ if (ret) {
opkt.buf = av_buffer_create(opkt.data, opkt.size, av_buffer_default_free, NULL, 0);
if (!opkt.buf)
exit_program(1);