ext/ffmpeg/gstffmpegcodecmap.c: Fix AMR caps. Fixes #364956.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_codecid):
Fix AMR caps. Fixes #364956.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_get_stream):
Activate pads before adding them.
This commit is contained in:
Wim Taymans 2006-10-25 17:20:25 +00:00
parent f36390c258
commit 87106ca6c7
3 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,12 @@
2006-10-25 Wim Taymans <wim@fluendo.com>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_codecid):
Fix AMR caps. Fixes #364956.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_get_stream):
Activate pads before adding them.
2006-10-24 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_collected):

View file

@ -845,11 +845,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
break;
case CODEC_ID_AMR_NB:
caps = gst_ff_aud_caps_new (context, "audio/x-amr-nb", NULL);
caps = gst_ff_aud_caps_new (context, "audio/AMR", NULL);
break;
case CODEC_ID_AMR_WB:
caps = gst_ff_aud_caps_new (context, "audio/x-amr-wb", NULL);
caps = gst_ff_aud_caps_new (context, "audio/AMR-WB", NULL);
break;
case CODEC_ID_RA_144:
@ -2228,10 +2228,10 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
break;
}
}
} else if (!strcmp (mimetype, "audio/x-amrnb")) {
} else if (!strcmp (mimetype, "audio/AMR")) {
audio = TRUE;
id = CODEC_ID_AMR_NB;
} else if (!strcmp (mimetype, "audio/x-amrwb")) {
} else if (!strcmp (mimetype, "audio/AMR-WB")) {
id = CODEC_ID_AMR_WB;
audio = TRUE;
} else if (!strcmp (mimetype, "video/x-h264")) {

View file

@ -867,6 +867,8 @@ gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream)
demux->streams[avstream->index] = stream;
/* activate and add */
gst_pad_set_active (pad, TRUE);
gst_element_add_pad (GST_ELEMENT (demux), pad);
/* metadata */