[FFmpeg-devel] [PATCH] print streams no associated with any program
Michael Niedermayer
michaelni
Mon Oct 19 15:29:29 CEST 2009
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.
>
>
> --
> Baptiste COUDURIER
> Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> FFmpeg maintainer http://www.ffmpeg.org
> utils.c | 5 +++++
> 1 file changed, 5 insertions(+)
> c6cb68209916a9a68d99980e43df9763ac9076f0 program_check_stream_index.patch
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091019/6385dc1d/attachment.pgp>
More information about the ffmpeg-devel
mailing list