summaryrefslogtreecommitdiff
path: root/libavcodec/trace_headers_bsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/trace_headers_bsf.c')
-rw-r--r--libavcodec/trace_headers_bsf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/trace_headers_bsf.c b/libavcodec/trace_headers_bsf.c
index 8322229d4c..61284e615e 100644
--- a/libavcodec/trace_headers_bsf.c
+++ b/libavcodec/trace_headers_bsf.c
@@ -28,6 +28,7 @@
typedef struct TraceHeadersContext {
CodedBitstreamContext *cbc;
+ CodedBitstreamFragment fragment;
} TraceHeadersContext;
@@ -44,13 +45,13 @@ static int trace_headers_init(AVBSFContext *bsf)
ctx->cbc->trace_level = AV_LOG_INFO;
if (bsf->par_in->extradata) {
- CodedBitstreamFragment ps;
+ CodedBitstreamFragment *frag = &ctx->fragment;
av_log(bsf, AV_LOG_INFO, "Extradata\n");
- err = ff_cbs_read_extradata(ctx->cbc, &ps, bsf->par_in);
+ err = ff_cbs_read_extradata(ctx->cbc, frag, bsf->par_in);
- ff_cbs_fragment_uninit(ctx->cbc, &ps);
+ ff_cbs_fragment_uninit(ctx->cbc, frag);
}
return err;
@@ -66,7 +67,7 @@ static void trace_headers_close(AVBSFContext *bsf)
static int trace_headers(AVBSFContext *bsf, AVPacket *pkt)
{
TraceHeadersContext *ctx = bsf->priv_data;
- CodedBitstreamFragment au;
+ CodedBitstreamFragment *frag = &ctx->fragment;
char tmp[256] = { 0 };
int err;
@@ -92,9 +93,9 @@ static int trace_headers(AVBSFContext *bsf, AVPacket *pkt)
av_log(bsf, AV_LOG_INFO, "Packet: %d bytes%s.\n", pkt->size, tmp);
- err = ff_cbs_read_packet(ctx->cbc, &au, pkt);
+ err = ff_cbs_read_packet(ctx->cbc, frag, pkt);
- ff_cbs_fragment_uninit(ctx->cbc, &au);
+ ff_cbs_fragment_uninit(ctx->cbc, frag);
if (err < 0)
av_packet_unref(pkt);