summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2014-04-28 16:08:33 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2014-06-20 10:39:33 -0400
commit9e500efdbe0deeff1602500ebc229a0a6b6bb1a2 (patch)
treeab9fefcc3d3bab4d2a75f427e96587fd61ec2770 /libavcodec/h264_slice.c
parentd349afb07bacccb62eb5369c38d6406d2909d792 (diff)
Add av_image_check_sar() and use it to validate SAR
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 25f0f4d4af..8e0e187af2 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1067,8 +1067,7 @@ static int h264_slice_header_init(H264Context *h, int reinit)
h->avctx->thread_count : 1;
int i, ret;
- h->avctx->sample_aspect_ratio = h->sps.sar;
- av_assert0(h->avctx->sample_aspect_ratio.den);
+ ff_set_sar(h->avctx, h->sps.sar);
av_pix_fmt_get_chroma_sub_sample(h->avctx->pix_fmt,
&h->chroma_x_shift, &h->chroma_y_shift);