From 0798d91a75cb8e4fc3c3519358e8e07abfb73115 Mon Sep 17 00:00:00 2001
From: Vittorio Giovara <vittorio.giovara@gmail.com>
Date: Wed, 15 Apr 2015 13:27:01 +0100
Subject: [PATCH] h264: Do not fail on unsupported timing info
The spec madandate both time_scale and num_units_in_tick greater than 0,
however since they are not essential for decoding, just ignore the whole
block and try to finish parsing the VUI.
Related to Ticket4445.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
---
libavcodec/h264_ps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 490cd20..3c89181 100644
|
a
|
b
|
static inline int decode_vui_parameters(H264Context *h, SPS *sps)
|
| 197 | 197 | av_log(h->avctx, AV_LOG_ERROR, |
| 198 | 198 | "time_scale/num_units_in_tick invalid or unsupported (%"PRIu32"/%"PRIu32")\n", |
| 199 | 199 | sps->time_scale, sps->num_units_in_tick); |
| 200 | | return AVERROR_INVALIDDATA; |
| | 200 | sps->timing_info_present_flag = 0; |
| 201 | 201 | } |
| 202 | 202 | sps->fixed_frame_rate_flag = get_bits1(&h->gb); |
| 203 | 203 | } |