aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-02-07 14:31:49 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-02-09 21:51:41 -0500
commitb758cf7343d169afaa79a62b8a47af9ced04be27 (patch)
tree9519dfea9f51843c020022b7d8210f0588089d46 /libavcodec/utils.c
parenta75bc764ec89d800fa8d70662f16f89cdec17b49 (diff)
downloadffmpeg-b758cf7343d169afaa79a62b8a47af9ced04be27.tar.gz
avcodec: set avpkt->size to 0 if encode2() did not output a packet
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9dded6ae05..de3816b27f 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -881,6 +881,8 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
avctx->time_base);
}
avpkt->dts = avpkt->pts;
+ } else {
+ avpkt->size = 0;
}
} else {
/* for compatibility with encoders not supporting encode2(), we need to