This isn't exactly equivalent with the earlier code for codecs
other than H264 and VC1, but those are two only codecs supported
by this codepath anyway, and it simplifies it a bit.
---
 libavformat/movenc.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index a832c1d..1d808f1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2140,28 +2140,25 @@ static int mov_write_isml_manifest(AVIOContext *pb, 
MOVMuxContext *mov)
             if (track->enc->codec_id == CODEC_ID_H264) {
                 uint8_t *ptr;
                 int size = track->enc->extradata_size;
                 if (!ff_avc_write_annexb_extradata(track->enc->extradata, &ptr,
                                                    &size)) {
                     param_write_hex(pb, "CodecPrivateData",
                                     ptr ? ptr : track->enc->extradata,
                                     size);
                     av_free(ptr);
                 }
-            } else {
-                param_write_hex(pb, "CodecPrivateData", track->enc->extradata,
-                                track->enc->extradata_size);
-            }
-            if (track->enc->codec_id == CODEC_ID_H264) {
                 param_write_string(pb, "FourCC", "H264");
             } else if (track->enc->codec_id == CODEC_ID_VC1) {
                 param_write_string(pb, "FourCC", "WVC1");
+                param_write_hex(pb, "CodecPrivateData", track->enc->extradata,
+                                track->enc->extradata_size);
             }
             param_write_int(pb, "MaxWidth", track->enc->width);
             param_write_int(pb, "MaxHeight", track->enc->height);
             param_write_int(pb, "DisplayWidth", track->enc->width);
             param_write_int(pb, "DisplayHeight", track->enc->height);
         } else {
             if (track->enc->codec_id == CODEC_ID_AAC) {
                 param_write_string(pb, "FourCC", "AACL");
             } else if (track->enc->codec_id == CODEC_ID_WMAPRO) {
                 param_write_string(pb, "FourCC", "WMAP");
-- 
1.7.3.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to