[FFmpeg-devel] A question about AVOutputFormat.write_trailer (cosmetical)
Michael Niedermayer
michaelni
Wed Jun 27 01:42:27 CEST 2007
Hi
On Wed, Jun 27, 2007 at 01:20:05AM +0200, Vitor wrote:
> Hi
>
> Aurelien Jacobs wrote:
> >On Tue, 26 Jun 2007 22:48:21 +0200
> >Vitor <vitor1001 at gmail.com> wrote:
> >
> >>Hi
> >>
> >>Michael Niedermayer wrote:
> >>>On Tue, Jun 26, 2007 at 09:07:50PM +0200, Vitor wrote:
> >>>>Hi,
> >>>>
> >>>>For a good number of muxers (notably in raw.c), there is an empty
> >>>>function that is passed to AVOutputFormat.write_trailer. The only place
> >>>>it is called checks for a NULL pointer, and almost every muxer pass a
> >>>>NULL pointer to AVOutputFormat.interleave_packet. So would it be ok to
> >>>>send a patch to remove all those empty functions and set write_trailer
> >>>>to NULL instead?
> >>>yes
> >>Patch attached.
> >>
> >>[...]
> >>
> >>@@ -119,5 +114,5 @@
> >> CODEC_ID_NONE,
> >> adts_write_header,
> >> adts_write_packet,
> >>- adts_write_trailer,
> >>+ NULL,
> >> };
> >
> >The NULL here is absolutely useless. IMHO, you should simply remove the
> >write_trailer line (here and everywhere else in your patch).
>
> You're right. Patch attached.
[...]
> Index: libavformat/yuv4mpeg.c
> ===================================================================
> --- libavformat/yuv4mpeg.c (revision 9440)
> +++ libavformat/yuv4mpeg.c (working copy)
> @@ -166,11 +166,6 @@
> return 0;
> }
>
> -static int yuv4_write_trailer(AVFormatContext *s)
> -{
> - return 0;
> -}
> -
> #ifdef CONFIG_YUV4MPEGPIPE_MUXER
> AVOutputFormat yuv4mpegpipe_muxer = {
> "yuv4mpegpipe",
> @@ -182,7 +177,7 @@
> CODEC_ID_RAWVIDEO,
> yuv4_write_header,
> yuv4_write_packet,
> - yuv4_write_trailer,
> + NULL,
> .flags = AVFMT_RAWPICTURE,
> };
the NULL here can be removed too
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070627/e989a1dd/attachment.pgp>
More information about the ffmpeg-devel
mailing list