diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-10-05 05:43:25 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-10-05 05:43:25 +0400 |
commit | cfa5a81ea672ac355afad88ea239f7ba5c3d72f0 (patch) | |
tree | 88984a1df52b7de55e7ccb9ae66b54cb8557144d /libavcodec/h264.c | |
parent | c9b87628568a95e5c9fe788afa9534e809d32e0d (diff) |
Move aspect ratio 0/0 avoidance code so the values in the sps struct are not missed.
This preempts issues with av_cmp_q(0/0, X)
Originally committed as revision 25337 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index a6e30df500..247dbb29b8 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -38,6 +38,7 @@ #include "mathops.h" #include "rectangle.h" #include "vdpau_internal.h" +#include "libavutil/avassert.h" #include "cabac.h" @@ -1826,8 +1827,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ avcodec_set_dimensions(s->avctx, s->width, s->height); s->avctx->sample_aspect_ratio= h->sps.sar; - if(!s->avctx->sample_aspect_ratio.den) - s->avctx->sample_aspect_ratio.den = 1; + av_assert0(s->avctx->sample_aspect_ratio.den); if(h->sps.video_signal_type_present_flag){ s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; |