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

pull/3/merge
Justin Ruggles 13 years ago
parent a75bc764ec
commit b758cf7343
  1. 2
      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

Loading…
Cancel
Save