[FFmpeg-devel] [PATCH] print stream sar
Michael Niedermayer
michaelni
Wed Jan 21 01:39:43 CET 2009
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
> + 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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20090121/6b8d7b71/attachment.pgp>
More information about the ffmpeg-devel
mailing list