---
libavcodec/h264.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8847f1f..35cc800 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4070,17 +4070,16 @@ again:
hx->nal_unit_type, bit_length);
}
- if (context_count == h->max_contexts) {
- execute_decode_slices(h, context_count);
+ if (!err && context_count == h->max_contexts) {
+ err = execute_decode_slices(h, context_count);
context_count = 0;
}
- if (err < 0) {
- av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header
error\n");
- if (h->context_reinitialized) {
- buf_index = err;
- goto end;
- }
+ if (err < 0 && (h->setup_finished || h->context_reinitialized)) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "failed to decode NAL %d\n",
+ nal_index);
+ buf_index = err;
+ goto end;
}
else if (err == 1) {
/* Slice could not be decoded in parallel mode, copy down
--
1.7.12.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel