[FFmpeg-devel] [PATCH] Fixed NULL deference in mov muxer
Reimar Döffinger
Reimar.Doeffinger
Tue Sep 2 21:08:49 CEST 2008
On Tue, Sep 02, 2008 at 08:36:21PM +0200, Laurent Aimar wrote:
> On Tue, Sep 02, 2008, Baptiste Coudurier wrote:
> > Laurent Aimar wrote:
> > > The attached patch fixed a NULL deference in mov muxer for unsupported
> > > track.
> > Interesting, what do you mean by unsupported ?
> > Are you creating a track with no samples ?
>
> Sorry, I didn't meant to send this one, I do not think a fix is needed at all
> here.
>
> About my problem:
>
> track->enc was NULL because mov_write_header had failed but I still called
> mov_write_trailer.
>
> It is not documented how to react to av_write_header erros but it seems
> logical that I should not call av_write_trailer if av_write_header has
> failed...
Maybe this should be done:
Index: avformat.h
===================================================================
--- avformat.h (revision 15154)
+++ avformat.h (working copy)
@@ -961,6 +961,8 @@
* @brief Write the stream trailer to an output media file and
* free the file private data.
*
+ * May only be called after a successful call to av_write_header.
+ *
* @param s media file handle
* @return 0 if OK. AVERROR_xxx if error.
*/
More information about the ffmpeg-devel
mailing list