Commit d0cf9fb5 authored by Edward Hervey's avatar Edward Hervey 🤘

ext/ffmpeg/: Handle VC-1 properly , which is handled differently from WMV3.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open):
Handle VC-1 properly , which is handled differently from WMV3.
parent 4807d901
2007-12-17 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open):
Handle VC-1 properly , which is handled differently from WMV3.
2007-12-17 Edward Hervey <edward.hervey@collabora.co.uk>
* autogen.sh:
......
......@@ -631,10 +631,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
break;
case CODEC_ID_WMV3:
case CODEC_ID_VC1:
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
"wmvversion", G_TYPE_INT, 3, NULL);
break;
case CODEC_ID_VC1:
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
"wmvversion", G_TYPE_INT, 3, "fourcc", GST_TYPE_FOURCC,
GST_MAKE_FOURCC('W', 'V', 'C', '1'), NULL);
break;
case CODEC_ID_QDM2:
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-qdm2", NULL);
break;
......@@ -2051,7 +2055,14 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
id = CODEC_ID_WMV2;
break;
case 3:
id = CODEC_ID_WMV3;
{
guint32 fourcc;
if (gst_structure_get_fourcc (structure, "fourcc", &fourcc)) {
if (fourcc == GST_MAKE_FOURCC ('W', 'V', 'C', '1'))
id = CODEC_ID_VC1;
} else
id = CODEC_ID_WMV3;
}
break;
}
}
......
......@@ -498,6 +498,7 @@ gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
case CODEC_ID_MPEG4:
case CODEC_ID_MJPEG:
case CODEC_ID_MP3:
case CODEC_ID_VC1:
GST_LOG_OBJECT (ffmpegdec, "not using parser, blacklisted codec");
ffmpegdec->pctx = NULL;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment