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?
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".