[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

Michael Niedermayer michaelni
Sat Jul 3 03:55:58 CEST 2010


On Fri, Jul 02, 2010 at 12:06:45PM -0700, Baptiste Coudurier wrote:
> 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.

yes, agree

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100703/42b4aadf/attachment.pgp>



More information about the ffmpeg-devel mailing list