[FFmpeg-devel] [PATCH 2/3] lavf/dv: shorten code by using a local variable
Anton Khirnov
anton at khirnov.net
Mon Apr 24 18:55:52 EEST 2023
---
libavformat/dv.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/libavformat/dv.c b/libavformat/dv.c
index d30dc298805..49c4f421fa5 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)
--
2.39.2
More information about the ffmpeg-devel
mailing list