1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-29 07:18:22 +02:00

Merge commit '71d3305c2711d4f6ec8b92db09ff64cf4e19a58e'

* commit '71d3305c2711d4f6ec8b92db09ff64cf4e19a58e':
  h264_parse: make sure the ref count is zeroed on all failure paths

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2016-05-17 15:18:43 +01:00
commit d55568d22a

View File

@ -218,7 +218,7 @@ int ff_h264_parse_ref_count(int *plist_count, int ref_count[2],
ref_count[0] - 1, max[0], ref_count[1] - 1, max[1]);
ref_count[0] = ref_count[1] = 0;
*plist_count = 0;
return AVERROR_INVALIDDATA;
goto fail;
}
if (slice_type_nos == AV_PICTURE_TYPE_B)
@ -233,4 +233,9 @@ int ff_h264_parse_ref_count(int *plist_count, int ref_count[2],
*plist_count = list_count;
return 0;
fail:
*plist_count = 0;
ref_count[0] = 0;
ref_count[1] = 0;
return AVERROR_INVALIDDATA;
}