Fixes hardware decoders depending on long_term_pic_idx. Relevant ITU conformance test vectors: MR6_BT_B, MR8_BT_B
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -337,7 +337,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 336 unmodified lines | ||
| 337 | 337 | break; |
| 338 | 338 | } |
| 339 | 339 | if (i >= 0) |
| 340 | − ref->pic_id = pred; | |
| 340 | + pic_id = pred; | |
| 341 | 341 | break; |
| 342 | 342 | } |
| 343 | 343 | case 2: { |
| @@ -354,7 +354,6 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 10 unmodified lines | ||
| 354 | 354 | ref = h->long_ref[long_idx]; |
| 355 | 355 | assert(!(ref && !ref->reference)); |
| 356 | 356 | if (ref && (ref->reference & pic_structure)) { |
| 357 | − ref->pic_id = pic_id; | |
| 358 | 357 | assert(ref->long_ref); |
| 359 | 358 | i = 0; |
| 360 | 359 | } else { |
| @@ -376,7 +375,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 15 unmodified lines | ||
| 376 | 375 | for (i = index; i + 1 < sl->ref_count[list]; i++) { |
| 377 | 376 | if (sl->ref_list[list][i].parent && |
| 378 | 377 | ref->long_ref == sl->ref_list[list][i].parent->long_ref && |
| 379 | − ref->pic_id == sl->ref_list[list][i].pic_id) | |
| 378 | + pic_id == sl->ref_list[list][i].pic_id) | |
| 380 | 379 | break; |
| 381 | 380 | } |
| 382 | 381 | for (; i > index; i--) { |