[FFmpeg-devel] [RFC][PATCH] return packets for known codecs earlier when codec probing is done

Baptiste Coudurier baptiste.coudurier
Wed May 27 20:29:25 CEST 2009


On 5/27/2009 12:54 AM, Baptiste Coudurier wrote:
> Hi Michael,
> 
> Michael Niedermayer wrote:
>> [...]
>>
>>> @@ -537,10 +537,18 @@ int av_read_packet(AVFormatContext *s, AVPacket *p
>>>  
>>>          av_init_packet(pkt);
>>>          ret= s->iformat->read_packet(s, pkt);
>>> -        if (ret < 0)
>>> -            return ret;
>>> +        if (ret < 0) {
>>> +            if (!pktl)
>>> +                return ret;
>>> +            for (i = 0; i < s->nb_streams; i++)
>>> +                if (s->streams[i]->codec->codec_id == CODEC_ID_PROBE)
>>> +                    s->streams[i]->codec->codec_id = CODEC_ID_NONE;
>>> +            continue;
>>> +        }
>> i dont like this
>>
> 
> Well, we have a problem if probe_packets is not 0 when eof is reached.
> Do you see another way to avoid this ?

This is needed to be able to export all streams from TS btw, that the
later should finally leverage codec probing and provide great
flexibility regarding private stream types.

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



More information about the ffmpeg-devel mailing list