[FFmpeg-devel] [PATCH 4/17] avformat/segment: Don't set extradata size twice

Michael Niedermayer michaelni at gmx.at
Tue Mar 3 00:38:47 EET 2020


On Mon, Mar 02, 2020 at 10:47:29AM +0530, Gyan Doshi wrote:
> 
> 
> On 02-03-2020 10:05 am, Andreas Rheinhardt wrote:
> >ff_alloc_extradata() already sets the size of the extradata so doing it
> >again is unnecessary.
> >
> >Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> >---
> >  libavformat/segment.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> >diff --git a/libavformat/segment.c b/libavformat/segment.c
> >index 5f7fe76600..d565183349 100644
> >--- a/libavformat/segment.c
> >+++ b/libavformat/segment.c
> >@@ -882,7 +882,6 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
> >                  goto calc_times;
> >              }
> >              memcpy(st->codecpar->extradata, pkt_extradata, pkt_extradata_size);
> >-            st->codecpar->extradata_size = pkt_extradata_size;
> >          }
> >      }
> 
> LGTM.

will apply

thx


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200302/01c7d543/attachment.sig>


More information about the ffmpeg-devel mailing list