[FFmpeg-devel] [PATCH] Additional probing based on sequence header and group startcodes

Jai Menon jmenon86
Sun Jun 14 10:12:32 CEST 2009


On Sat, Jun 13, 2009 at 10:21 PM, Baptiste
Coudurier<baptiste.coudurier at gmail.com> wrote:
> Jai Menon wrote:
>> On Sat, Jun 13, 2009 at 9:29 PM, Baptiste
>> Coudurier<baptiste.coudurier at gmail.com> wrote:
>>> Michael Niedermayer wrote:
>>>> On Sat, Jun 13, 2009 at 08:27:26PM +0000, Jai Menon wrote:
>>>>> Hi,
>>>>>
>>>>> I'm not too familiar with the probing mechanism so any help is
>>>>> appreciated. This might not be the right way to do it. Also, this
>>>>> fixes issue 1185 and possibly others.
>>>> [...]
>>>>> diff --git a/libavformat/utils.c b/libavformat/utils.c
>>>>> index dc18885..0096343 100644
>>>>> --- a/libavformat/utils.c
>>>>> +++ b/libavformat/utils.c
>>>>> @@ -339,6 +339,9 @@ static int set_codec_from_probe_data(AVStream *st, AVProbeData *pd, int score)
>>>>> ? ? ? ? ?} else if (!strcmp(fmt->name, "dts")) {
>>>>> ? ? ? ? ? ? ?st->codec->codec_id = CODEC_ID_DTS;
>>>>> ? ? ? ? ? ? ?st->codec->codec_type = CODEC_TYPE_AUDIO;
>>>>> + ? ? ? ?} else if (!strcmp(fmt->name, "mpeg")) {
>>>>> + ? ? ? ? ? ?st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
>>>>> + ? ? ? ? ? ?st->codec->codec_type = CODEC_TYPE_VIDEO;
>>>>> ? ? ? ? ?}
>>>>> ? ? ?}
>>>>> ? ? ?return !!fmt;
>>>> this part is ok and can be commited seperately
>>> Humm, what if stream contain H264 ? "mpeg" is mpeg ps demuxer.
>>
>> Do you have any samples where avc isn't muxed with ES type 0x1b set in
>> the stream map? I had thought about this too and hoped if nothing else
>> to get a sample. And what should be done in this case? should the
>> probing be done in the demuxer?
>>
>
> No I don't have a sample. Thing is if "mpeg" matches this does not say
> that stream contains mpeg2video. This case is handled by mpegvideo
> probe. If this stream is not matched for a reason, the reason should be
> in mpegvideo probe.

Thanks for the explanation, I added the modifications to the mpegvideo
probe code in raw.c.
Patch attached.

-- 
Regards,

Jai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-add-additional-probing-based-on-group-startcode.patch
Type: text/x-patch
Size: 1361 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090614/a806143a/attachment.bin>



More information about the ffmpeg-devel mailing list