[FFmpeg-devel] [PATCH] add context to av_log() calls
Benoit Fouet
benoit.fouet
Mon Feb 16 17:27:08 CET 2009
On 02/16/2009 05:20 PM, Michael Niedermayer wrote:
> On Mon, Feb 16, 2009 at 05:13:15PM +0100, Benoit Fouet wrote:
>
>> Hi,
>>
>> On 02/16/2009 05:00 PM, Michael Niedermayer wrote:
>>
>>> On Mon, Feb 16, 2009 at 02:35:23PM +0100, Benoit Fouet wrote:
>>>
> [...]
>
>>>> Index: libavformat/avidec.c
>>>> ===================================================================
>>>> --- libavformat/avidec.c (revision 17366)
>>>> +++ libavformat/avidec.c (working copy)
>>>> @@ -87,7 +87,7 @@ static void print_tag(const char *str, u
>>>> }
>>>> #endif
>>>>
>>>> -static int get_riff(AVIContext *avi, ByteIOContext *pb)
>>>> +static int get_riff(AVFormatContext *s, AVIContext *avi, ByteIOContext *pb)
>>>>
>>>>
>>> this seems redundant
>>>
>>>
>>>
>>>
>> I'm not sure I understand. Is there an av_log()-friendly context already
>> available in one of the two parameters ?
>>
>
> AVIContext *avi = s->priv_data;
> so pasing AVIContext seems redundant
>
>
> [...]
>
>
of course, silly me... new patch attached.
>>>> Index: libavformat/mm.c
>>>> ===================================================================
>>>> --- libavformat/mm.c (revision 17366)
>>>> +++ libavformat/mm.c (working copy)
>>>> @@ -168,7 +168,7 @@ static int mm_read_packet(AVFormatContex
>>>> return 0;
>>>>
>>>> default :
>>>> - av_log(NULL, AV_LOG_INFO, "mm: unknown chunk type 0x%x\n", type);
>>>> + av_log(s, AV_LOG_INFO, "mm: unknown chunk type 0x%x\n", type);
>>>>
>>>>
>>> ^^
>>> redundant
>>>
>>>
>>>
>> how about that one ?
>>
>> Index: libavformat/mm.c
>> ===================================================================
>> --- libavformat/mm.c (revision 17366)
>> +++ libavformat/mm.c (working copy)
>> @@ -168,7 +168,7 @@ static int mm_read_packet(AVFormatContex
>> return 0;
>>
>> default :
>> - av_log(NULL, AV_LOG_INFO, "mm: unknown chunk type 0x%x\n",
>> type);
>> + av_log(s, AV_LOG_INFO, "unknown chunk type 0x%x\n", type);
>> url_fseek(pb, length, SEEK_CUR);
>> }
>> }
>>
>>
>
> ok
>
>
applied
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avidec.c.diff
Type: text/x-patch
Size: 6295 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090216/f6d51e9e/attachment.bin>
More information about the ffmpeg-devel
mailing list