On 01/12/2017 03:30 PM, Hendrik Leppkes wrote:
> On Fri, Jan 13, 2017 at 7:36 AM, John Stebbins <[email protected]> 
> wrote:
>> ---
>>  libavformat/asfdec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
>> index 1c50ad6..d602af8 100644
>> --- a/libavformat/asfdec.c
>> +++ b/libavformat/asfdec.c
>> @@ -1485,7 +1485,7 @@ static int asf_read_packet(AVFormatContext *s, 
>> AVPacket *pkt)
>>              asf->return_subpayload = 0;
>>              return 0;
>>          }
>> -        for (i = 0; i < s->nb_streams; i++) {
>> +        for (i = 0; i < asf->nb_streams; i++) {
>>              ASFPacket *asf_pkt = &asf->asf_st[i]->pkt;
>>              if (asf_pkt && !asf_pkt->size_left && asf_pkt->data_size) {
>>                  if (asf->asf_st[i]->span > 1 &&
> "Fix crash" isn't very descriptive on what its fixing and for people
> not intrinsically familiar with asfdec.c it doesn't seem very obvious
> why this was wrong, so maybe a tiny bit of elaboration in the commit
> message? :)
>
>

How about adding:
The index is used to access AFStreams array, so AVStream.nb_streams is 
incorrect.

-- 
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to