libavcodec/h264_refs.c:788:15: warning: 'i' may be used uninitialized in this
function [-Wuninitialized]
---
Now without messing up the order of the conditions.
libavcodec/h264_refs.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index c965033..0846233 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -782,13 +782,14 @@ int ff_h264_decode_ref_pic_marking(H264Context *h,
GetBitContext *gb,
if (first_slice && mmco_index != -1) {
h->mmco_index = mmco_index;
- } else if (!first_slice && mmco_index >= 0 &&
- (mmco_index != h->mmco_index ||
- (i = check_opcodes(h->mmco, mmco_temp, mmco_index)))) {
- av_log(h->avctx, AV_LOG_ERROR,
- "Inconsistent MMCO state between slices [%d, %d, %d]\n",
- mmco_index, h->mmco_index, i);
- return AVERROR_INVALIDDATA;
+ } else if (!first_slice && mmco_index >= 0) {
+ if ((i = check_opcodes(h->mmco, mmco_temp, mmco_index)) ||
+ mmco_index != h->mmco_index) {
+ av_log(h->avctx, AV_LOG_ERROR,
+ "Inconsistent MMCO state between slices [%d, %d, %d]\n",
+ mmco_index, h->mmco_index, i);
+ return AVERROR_INVALIDDATA;
+ }
}
return 0;
--
1.7.9.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel