Commit b758cf73 authored by Justin Ruggles's avatar Justin Ruggles

avcodec: set avpkt->size to 0 if encode2() did not output a packet

parent a75bc764
...@@ -881,6 +881,8 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, ...@@ -881,6 +881,8 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
avctx->time_base); avctx->time_base);
} }
avpkt->dts = avpkt->pts; avpkt->dts = avpkt->pts;
} else {
avpkt->size = 0;
} }
} else { } else {
/* for compatibility with encoders not supporting encode2(), we need to /* for compatibility with encoders not supporting encode2(), we need to
......
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