[FFmpeg-devel] [RFC]Ignore ff_isom_write_hvcc() return value writing mkv like the mov muxer does

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Dec 16 10:11:54 CET 2014


Attached poc fixes remuxing hevc from mpegts to mkv.
The mov muxer writes an empty hvcC atom in this case.

What has to be done?

Carl Eugen
-------------- next part --------------
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index c781c8a..e3fe4fa 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -602,8 +602,9 @@ static int mkv_write_native_codecprivate(AVFormatContext *s,
         return ff_isom_write_avcc(dyn_cp, codec->extradata,
     case AV_CODEC_ID_HEVC:
-        return ff_isom_write_hvcc(dyn_cp, codec->extradata,
+        ff_isom_write_hvcc(dyn_cp, codec->extradata,
                                   codec->extradata_size, 0);
+        return 0;
     case AV_CODEC_ID_ALAC:
         if (codec->extradata_size < 36) {
             av_log(s, AV_LOG_ERROR,

More information about the ffmpeg-devel mailing list