[FFmpeg-devel] [PATCH] print streams no associated with any program

Baptiste Coudurier baptiste.coudurier
Mon Oct 19 20:55:44 CEST 2009


On 10/19/2009 06:29 AM, Michael Niedermayer wrote:
> On Sun, Oct 18, 2009 at 07:15:03PM -0700, Baptiste Coudurier wrote:
>> On 10/18/09 5:07 PM, Michael Niedermayer wrote:
>>> On Sun, Oct 18, 2009 at 03:54:33PM -0700, Baptiste Coudurier wrote:
>>>> On 10/18/09 3:30 PM, Michael Niedermayer wrote:
>>>>> On Sun, Oct 18, 2009 at 02:56:28PM -0700, Baptiste Coudurier wrote:
> [...]
>>>>>>         av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
>>>>>>                 is_output ? "Output" : "Input",
>>>>>> @@ -2940,19 +2943,25 @@
>>>>>>             av_log(NULL, AV_LOG_INFO, "\n");
>>>>>>         }
>>>>>>         if(ic->nb_programs) {
>>>>>> -        int j, k;
>>>>>> +        int j, k, total = 0;
>>>>>>             for(j=0; j<ic->nb_programs; j++) {
>>>>>>                 AVMetadataTag *name =
>>>>>> av_metadata_get(ic->programs[j]->metadata,
>>>>>>                                                       "name", NULL, 0);
>>>>>>                 av_log(NULL, AV_LOG_INFO, "  Program %d %s\n",
>>>>>> ic->programs[j]->id,
>>>>>>                        name ? name->value : "");
>>>>>> -            for(k=0; k<ic->programs[j]->nb_stream_indexes; k++)
>>>>>> +            for(k=0; k<ic->programs[j]->nb_stream_indexes; k++) {
>>>>>>                     dump_stream_format(ic,
>>>>>> ic->programs[j]->stream_index[k], index, is_output);
>>>>>> +                printed[ic->programs[j]->stream_index[k]] = 1;
>>>>>
>>>>> off topic but this line made me think that av_program_add_stream_index()
>>>>> should check that idx is within the valid range
>>>>>
>>>>
>>>> Do you want me to add a check here as well ?
>>>
>>> hmm, dunno, do as you prefer
>>
>> Well I didn't add the check.
>> Here is patch to check stream index in av_program_add_stream_index.
>>

Applied.

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



More information about the ffmpeg-devel mailing list