summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-10-05 01:43:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-10-05 01:43:25 +0000
commitcfa5a81ea672ac355afad88ea239f7ba5c3d72f0 (patch)
tree88984a1df52b7de55e7ccb9ae66b54cb8557144d /libavcodec/h264_ps.c
parentc9b87628568a95e5c9fe788afa9534e809d32e0d (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_ps.c')
-rw-r--r--libavcodec/h264_ps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 6c5e065178..6e12700023 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -387,6 +387,9 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
if (decode_vui_parameters(h, sps) < 0)
goto fail;
+ if(!sps->sar.den)
+ sps->sar.den= 1;
+
if(s->avctx->debug&FF_DEBUG_PICT_INFO){
av_log(h->s.avctx, AV_LOG_DEBUG, "sps:%u profile:%d/%d poc:%d ref:%d %dx%d %s %s crop:%d/%d/%d/%d %s %s %d/%d\n",
sps_id, sps->profile_idc, sps->level_idc,