On 15/03/14 08:51, Anton Khirnov wrote:
> 
> On Thu, 13 Mar 2014 22:35:41 +0100, Luca Barbato <[email protected]> wrote:
>> It should provide a quicker guess for elementary streams provided
>> by http.
>> ---
>>  libavformat/avformat.h |  7 +++++++
>>  libavformat/format.c   | 29 +++++++++++++++++++----------
>>  2 files changed, 26 insertions(+), 10 deletions(-)
>>
>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
>> index ec9c262..d532ad6 100644
>> --- a/libavformat/avformat.h
>> +++ b/libavformat/avformat.h
>> @@ -389,6 +389,7 @@ typedef struct AVProbeData {
>>      const char *filename;
>>      unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra 
>> allocated bytes filled with zero. */
>>      int buf_size;       /**< Size of buf except extra allocated bytes */
>> +    uint8_t *mime_type; /**< mime_type, when known. */
> 
> This breaks ABI

You are right =_=.

>>  } AVProbeData;
>>  
>>  #define AVPROBE_SCORE_EXTENSION  50 ///< score for file extension
>> @@ -620,6 +621,12 @@ typedef struct AVInputFormat {
>>       * Active streams are all streams that have AVStream.discard < 
>> AVDISCARD_ALL.
>>       */
>>      int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t 
>> min_ts, int64_t ts, int64_t max_ts, int flags);
>> +
>> +    /**
>> +     * Used to raise the score while probing for unknown format
> 
> This documentation is very vague, please be more precise.

I will.

>> +     * @see av_probe_input_format2
>> +     */
>> +    const char *mime_type;
> 
> Is it supposed to be public? Then it should be higher up.
> Also, shouldn't this better be a list of strings?

It is consistent with the field with the same name in AVOutputFormat.

> This jumping inside of a block looks evil and likely to break in the future.

I can jump immediately outside the block.


_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to