h264: informative error reporting in decode_slice_header()

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
Luca Barbato 2014-02-18 23:47:55 +01:00 committed by Vittorio Giovara
parent 96f9fbe109
commit fea6db064b

View File

@ -3471,8 +3471,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->height != h->avctx->coded_height || h->height != h->avctx->coded_height ||
needs_reinit)) { needs_reinit)) {
if (h != h0) { if (h != h0) {
av_log(h->avctx, AV_LOG_ERROR, "changing width/height on " av_log(h->avctx, AV_LOG_ERROR,
"slice %d\n", h0->current_slice + 1); "changing width %d -> %d / height %d -> %d on "
"slice %d\n",
h->width, h->avctx->coded_width,
h->height, h->avctx->coded_height,
h0->current_slice + 1);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }