[FFmpeg-devel] [PATCH] print stream sar

Baptiste Coudurier baptiste.coudurier
Wed Jan 21 01:52:14 CET 2009


Michael Niedermayer wrote:
> On Tue, Jan 20, 2009 at 01:43:24PM -0800, Baptiste Coudurier wrote:
>> Baptiste Coudurier wrote:
>>> Hi,
>>> 
>>> $subject:
>>> 
>> Better to only print it if it differs from codec.
>> 
>> -- Baptiste COUDURIER                              GnuPG Key Id:
>> 0x5C1ABAAA Key fingerprint
>> 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA checking for life_signs in
>> -lkenny... no FFmpeg maintainer
>> http://www.ffmpeg.org
> 
>> Index: libavformat/utils.c 
>> ===================================================================
>>  --- libavformat/utils.c	(revision 16696) +++ libavformat/utils.c
>> (working copy) @@ -2757,6 +2757,18 @@ av_log(NULL, AV_LOG_INFO,
>> "(%s)", st->language); av_log(NULL, AV_LOG_DEBUG, ", %d/%d",
>> st->time_base.num/g, st->time_base.den/g); av_log(NULL,
>> AV_LOG_INFO, ": %s", buf); +    if (st->sample_aspect_ratio.num &&
>> // default
> 
>> +        (st->sample_aspect_ratio.num !=
>> st->codec->sample_aspect_ratio.num || +
>> st->sample_aspect_ratio.den != st->codec->sample_aspect_ratio.den))
>> {
> 
> av_cmp_q

Changed.

>> +        AVRational display_aspect_ratio; +
>> av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, +
>> st->codec->width*st->sample_aspect_ratio.num, +
>> st->codec->height*st->sample_aspect_ratio.den, +
>> 1024*1024);
> 
>> +        av_log(NULL, AV_LOG_INFO, ", (PAR %d:%d DAR %d:%d)",
> 
> are the () needed? they would make the line shorter where they droped
> 

No objection, I just wanted a distinction between codec using '[]' and
stream using '()', though I'm ok without too. So you say we keep '[]'
for codec and use nothing for stream ?

Patch updated.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print_stream_sar2.patch
Type: text/x-diff
Size: 1200 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090120/d4028528/attachment.patch>



More information about the ffmpeg-devel mailing list