On 17/04/2017 21:47, Vittorio Giovara wrote:
> On Mon, Apr 17, 2017 at 3:27 PM, Luca Barbato <[email protected]> wrote:
>> Bug-Id: 1046
>> CC: [email protected]
>> ---
>>  libavformat/mm.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/libavformat/mm.c b/libavformat/mm.c
>> index 16505502fd..86e9ff0ba3 100644
>> --- a/libavformat/mm.c
>> +++ b/libavformat/mm.c
>> @@ -174,6 +174,12 @@ static int read_packet(AVFormatContext *s,
>>              return 0;
>>
>>          case MM_TYPE_AUDIO :
>> +            if (s->nb_streams != 2) {
>> +                av_log(s, AV_LOG_WARNING,
>> +                       "Unexpected audio packet, skipping\n");
>> +                avio_skip(pb, length);
>> +                return AVERROR_INVALIDDATA;
> 
> is this an error or a warning?
> won't returning a negative number for a read_packet function be bad
> for the caller?
> 

Right, it should be an error.

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

Reply via email to