diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-07 23:31:49 +0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-10 06:51:41 +0400 |
commit | b758cf7343d169afaa79a62b8a47af9ced04be27 (patch) | |
tree | 9519dfea9f51843c020022b7d8210f0588089d46 /libavcodec/utils.c | |
parent | a75bc764ec89d800fa8d70662f16f89cdec17b49 (diff) |
avcodec: set avpkt->size to 0 if encode2() did not output a packet
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 2 |
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 |