On Tue, Mar 15, 2022 at 9:47 AM Anton Khirnov <an...@khirnov.net> wrote:
> Quoting Paul B Mahol (2022-03-14 12:56:01) > > +static int null_encoder(AVCodecContext *avctx, AVPacket *pkt, > > + const AVFrame *frame, int *got_packet) > > +{ > > + int ret; > > + > > + pkt->pts = frame->pts; > > + if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) > > + pkt->duration = ff_samples_to_time_base(avctx, > frame->nb_samples); > > + pkt->flags |= AV_PKT_FLAG_KEY; > > + if ((ret = ff_alloc_packet(avctx, pkt, 1)) < 0) > > + return ret; > > + *got_packet = 1; > > Why return packets at all? Wouldn't it be simpler to just never return > any data? > But than there is no progress report at all. > > -- > Anton Khirnov > _______________________________________________ > 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". > _______________________________________________ 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".