Quoting Mark Thompson (2017-07-29 23:16:31)
> +static int trace_headers(AVBSFContext *bsf, AVPacket *out)
> +{
> + TraceHeadersContext *ctx = bsf->priv_data;
> + CodedBitstreamFragment au;
> + AVPacket *in;
> + char tmp[256] = { 0 };
> + int err;
> +
> + err = ff_bsf_get_packet(bsf, &in);
> + if (err < 0)
> + return err;
> +
> + if (in->flags & AV_PKT_FLAG_KEY)
> + av_strlcat(tmp, ", key frame", sizeof(tmp));
> + if (in->flags & AV_PKT_FLAG_CORRUPT)
> + av_strlcat(tmp, ", corrupt", sizeof(tmp));
> +
> + if (in->pts != AV_NOPTS_VALUE)
> + av_strlcatf(tmp, sizeof(tmp), ", pts %"PRId64, in->pts);
since you're going all out here, might as well print 'nopts' for
AV_NOPTS_VALUE
Otherwise looks ok.
--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel