[FFmpeg-devel] [PATCH 25/28] Don't assume reading more frames in av_find_stream_info will change a CODEC_ID_NONE into something better

Baptiste Coudurier baptiste.coudurier
Fri Jul 2 21:06:45 CEST 2010


On 7/2/10 7:13 AM, Michael Niedermayer wrote:
> On Thu, Jul 01, 2010 at 04:24:55PM -0700, Baptiste Coudurier wrote:
>> On 06/30/2010 02:09 AM, Mans Rullgard wrote:
>>> From: Cory Fields<theuni-nospam- at xbmc.org>
>>>
>>> ---
>>>    libavformat/utils.c |    2 +-
>>>    1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/libavformat/utils.c b/libavformat/utils.c
>>> index c13e732..5f9beb4 100644
>>> --- a/libavformat/utils.c
>>> +++ b/libavformat/utils.c
>>> @@ -2018,7 +2018,7 @@ static int has_codec_parameters(AVCodecContext *enc)
>>>            val = 1;
>>>            break;
>>>        }
>>> -    return enc->codec_id != CODEC_ID_NONE&&   val != 0;
>>> +    return enc->codec_id != CODEC_ID_PROBE&&   val != 0;
>>>    }
>>>
>>>    static int try_decode_frame(AVStream *st, AVPacket *avpkt)
>>
>> I've had something similar in my tree.
>
> the question is, is there some demuxer that sets none and can then with a
> later header set a codec id?

There is the mpegts demuxer, which only set probe until it finds actual 
data.

Besides for has_codec_parameters, != CODEC_ID_NONE && != CODEC_ID_PROBE 
seems to me the right choice logically.

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list