[FFmpeg-devel] [PATCH]Set sample_aspect_ratio in real demuxer
Michael Niedermayer
michaelni at gmx.at
Wed Dec 19 01:53:13 CET 2012
On Wed, Dec 19, 2012 at 12:04:38AM +0100, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch sets the sample_aspect_ratio similar to how the mov demuxer
> does it.
>
> Please comment, Carl Eugen
> rmdec.c | 3 +++
> 1 file changed, 3 insertions(+)
> c5d33240428571338e061bea9117c87508edeaa5 patchrealsar.diff
> diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
> index a19786b..0b4bcae 100644
> --- a/libavformat/rmdec.c
> +++ b/libavformat/rmdec.c
> @@ -355,6 +355,9 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
> goto fail1;
> st->codec->width = avio_rb16(pb);
> st->codec->height = avio_rb16(pb);
> + st->sample_aspect_ratio = av_d2q(((double)st->codec->height * st->codec->width) /
> + ((double)st->codec->width * st->codec->height),
> + INT_MAX);
w*h / (w*h) = 1
is that intended ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121219/1f235496/attachment.asc>
More information about the ffmpeg-devel
mailing list