History

avcodec/libdav1d: support parsing multiple ITU-T T.35 entries in a picture

This requires the newest libdav1d release.

James Almer committed 3 years ago

Commit 09b2ca91 parent 24f16b71 file · +11 −2Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/libdav1d.c+11−2
@@ -514,10 +514,16 @@ FF_ENABLE_DEPRECATION_WARNINGS · 513 unmodified lines
514514 light->MaxFALL = p->content_light->max_frame_average_light_level;
515515 }
516516 if (p->itut_t35) {
517+#if FF_DAV1D_VERSION_AT_LEAST(6,9)
518+ for (size_t i = 0; i < p->n_itut_t35; i++) {
519+ const Dav1dITUTT35 *itut_t35 = &p->itut_t35[i];
520+#else
521+ const Dav1dITUTT35 *itut_t35 = p->itut_t35;
522+#endif
517523 GetByteContext gb;
518524 int provider_code;
519525
520− bytestream2_init(&gb, p->itut_t35->payload, p->itut_t35->payload_size);
526+ bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size);
521527
522528 provider_code = bytestream2_get_be16(&gb);
523529 switch (provider_code) {
@@ -549,7 +555,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 25 unmodified lines
549555 int provider_oriented_code = bytestream2_get_be16(&gb);
550556 int application_identifier = bytestream2_get_byte(&gb);
551557
552− if (p->itut_t35->country_code != 0xB5 ||
558+ if (itut_t35->country_code != 0xB5 ||
553559 provider_oriented_code != 1 || application_identifier != 4)
554560 break;
555561
@@ -568,6 +574,9 @@ FF_ENABLE_DEPRECATION_WARNINGS · 12 unmodified lines
568574 default: // ignore unsupported provider codes
569575 break;
570576 }
577+#if FF_DAV1D_VERSION_AT_LEAST(6,9)
578+ }
579+#endif
571580 }
572581 if (p->frame_hdr->film_grain.present && (!dav1d->apply_grain ||
573582 (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t