Lynne: > (One-line) Patch attached: > >> --- a/libavcodec/encode.c >> +++ b/libavcodec/encode.c >> @@ -44,6 +44,7 @@ int ff_alloc_packet(AVCodecContext *avctx, AVPacket >> *avpkt, int64_t size) >> av_fast_padded_malloc(&avctx->internal->byte_buffer, >> &avctx->internal->byte_buffer_size, size); >> avpkt->data = avctx->internal->byte_buffer; >> + avpkt->time_base = avctx->time_base; >> if (!avpkt->data) { >> av_log(avctx, AV_LOG_ERROR, "Failed to allocate packet of size >> %"PRId64"\n", size); >> return AVERROR(ENOMEM); > > I'm not sure if this is the correct place to do this. >
Does this not need lots of FATE updates due to 1/2? I am quite surprised. And yes, this is definitely the wrong place to do this: It should be done at the end of avcodec_receive_packet() instead; not all encoders use ff_alloc_packet() at all (only those that don't allow custom buffers use it). - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".