From aae5ba31ca94307c15e134d98e7492cf5a208426 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 24 Apr 2023 16:00:38 +0200 Subject: [PATCH] lavf/dv: shorten code by using a local variable --- libavformat/dv.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index 9888c10b48..227caf168f 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -437,10 +437,13 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, return size; for (i = 0; i < c->ach; i++) { - c->audio_pkt[i].pos = pos; - c->audio_pkt[i].size = size; - c->audio_pkt[i].pts = (c->sys->height == 720) ? (c->frames & ~1) : c->frames; - c->audio_pkt[i].duration = 1; + DVPacket *dpkt = &c->audio_pkt[i]; + + dpkt->pos = pos; + dpkt->size = size; + dpkt->pts = (c->sys->height == 720) ? (c->frames & ~1) : c->frames; + dpkt->duration = 1; + ppcm[i] = c->audio_buf[i]; } if (c->ach)