This fixes a crash, when trying to mux h264 into mxf_opatom. Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> --- libavformat/mxfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 898951c..2891f5d 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -2358,7 +2358,7 @@ static int mxf_write_footer(AVFormatContext *s) mxf_write_random_index_pack(s); if (s->pb->seekable) { - if (s->oformat == &ff_mxf_opatom_muxer){ + if (s->oformat == &ff_mxf_opatom_muxer && mxf->body_partition_offset){ /* rewrite body partition to update lengths */ avio_seek(pb, mxf->body_partition_offset[0], SEEK_SET); if ((err = mxf_write_opatom_body_partition(s)) < 0) -- 2.1.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel