You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Merge commit '2ea00e35e4e0b58f7a306dd55d8f72a21c32c946'
* commit '2ea00e35e4e0b58f7a306dd55d8f72a21c32c946': h264: do not abuse the context as a temporary storage in get_last_needed_nal() Conflicts: libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1377,6 +1377,7 @@ static int get_last_needed_nal(H264Context *h, const uint8_t *buf, int buf_size)
|
|||||||
int first_slice = 0;
|
int first_slice = 0;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
GetBitContext gb;
|
||||||
int nalsize = 0;
|
int nalsize = 0;
|
||||||
int dst_length, bit_length, consumed;
|
int dst_length, bit_length, consumed;
|
||||||
const uint8_t *ptr;
|
const uint8_t *ptr;
|
||||||
@@ -1418,8 +1419,8 @@ static int get_last_needed_nal(H264Context *h, const uint8_t *buf, int buf_size)
|
|||||||
case NAL_DPA:
|
case NAL_DPA:
|
||||||
case NAL_IDR_SLICE:
|
case NAL_IDR_SLICE:
|
||||||
case NAL_SLICE:
|
case NAL_SLICE:
|
||||||
init_get_bits(&h->gb, ptr, bit_length);
|
init_get_bits(&gb, ptr, bit_length);
|
||||||
if (!get_ue_golomb(&h->gb) ||
|
if (!get_ue_golomb(&gb) ||
|
||||||
!first_slice ||
|
!first_slice ||
|
||||||
first_slice != h->nal_unit_type)
|
first_slice != h->nal_unit_type)
|
||||||
nals_needed = nal_index;
|
nals_needed = nal_index;
|
||||||
|
Reference in New Issue
Block a user