summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-19 13:24:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-19 13:24:43 +0000
commiteed4ebd22cddc238fed06e773d64ffb69dbdb6b7 (patch)
treed12a184f0d3b2498f84c4336e67885bee2f903d9 /libavcodec/h264.c
parent895345da9a45175c4cd6a72d6137218074423df8 (diff)
div by zero aspect fix
Originally committed as revision 3850 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 22106a9090..ade316b2e8 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3469,6 +3469,8 @@ static int decode_slice_header(H264Context *h){
s->avctx->width = s->width;
s->avctx->height = s->height;
s->avctx->sample_aspect_ratio= h->sps.sar;
+ if(!s->avctx->sample_aspect_ratio.den)
+ s->avctx->sample_aspect_ratio.den = 1;
if(h->sps.timing_info_present_flag && h->sps.fixed_frame_rate_flag){
s->avctx->frame_rate = h->sps.time_scale;