aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-18 04:07:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-18 04:07:53 +0100
commitc9ac08277daf6a1895b5a93a27874a605f15309e (patch)
treec3a6b01099d2ef66aa369e8ff001bc91da584153 /libavformat
parentc36010c286090ce7a1d7d3d61226d918d9a23490 (diff)
downloadffmpeg-c9ac08277daf6a1895b5a93a27874a605f15309e.tar.gz
movenc: Dont crash on aspect=0/0.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d1337a0705..72a66db84f 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1582,7 +1582,7 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov,
mov_write_udta_sdp(pb, track->rtp_ctx, track->track_id);
if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && track->mode == MODE_MOV) {
double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
- if (0.0 != sample_aspect_ratio && 1.0 != sample_aspect_ratio)
+ if (st->sample_aspect_ratio.num && 1.0 != sample_aspect_ratio)
mov_write_tapt_tag(pb, track);
};
return update_size(pb, pos);