From a8768a28e0942eec09a19bfcc40224c41739905e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 10 Jan 2005 09:18:23 +0000 Subject: [PATCH] Set the CodecID properly if native MPEG4 is wanted. --- src/output/p_video.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/output/p_video.cpp b/src/output/p_video.cpp index b160cd590..e70f11c55 100644 --- a/src/output/p_video.cpp +++ b/src/output/p_video.cpp @@ -75,19 +75,17 @@ video_packetizer_c::video_packetizer_c(generic_reader_c *nreader, } if ((mpeg_video == MPEG_VIDEO_NONE) && (ncodec_id != NULL) && - (!strcmp(ncodec_id, "V_MPEG1") || !strcmp(ncodec_id, "V_MPEG2"))) + (!strcmp(ncodec_id, MKV_V_MPEG1) || !strcmp(ncodec_id, MKV_V_MPEG2))) mpeg_video = (ncodec_id[6] == '1') ? MPEG_VIDEO_V1 : MPEG_VIDEO_V2; - if (ncodec_id != NULL) + if ((mpeg_video == MPEG_VIDEO_V4_LAYER_2) && + hack_engaged(ENGAGE_NATIVE_MPEG4)) + set_codec_id(MKV_V_MPEG4_ASP); + else if (ncodec_id != NULL) set_codec_id(ncodec_id); - else if ((mpeg_video == MPEG_VIDEO_V4_LAYER_2) && - hack_engaged(ENGAGE_NATIVE_MPEG4)) { - if (bframes) - set_codec_id(MKV_V_MPEG4_ASP); - else - set_codec_id(MKV_V_MPEG4_SP); - } else + else set_codec_id(MKV_V_MSCOMP); + if (((mpeg_video != MPEG_VIDEO_V4_LAYER_2) || !hack_engaged(ENGAGE_NATIVE_MPEG4)) && (hcodec_id != "") && (hcodec_id == MKV_V_MSCOMP) &&