[FFmpeg-cvslog] lavf/dv: shorten code by using a local variable

Anton Khirnov git at videolan.org
Tue May 2 12:30:50 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Apr 24 16:00:38 2023 +0200| [aae5ba31ca94307c15e134d98e7492cf5a208426] | committer: Anton Khirnov

lavf/dv: shorten code by using a local variable

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aae5ba31ca94307c15e134d98e7492cf5a208426
---

 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)



More information about the ffmpeg-cvslog mailing list