[FFmpeg-devel] [PATCH] mpeg12enc: Use all Closed Captions side data
Mathieu Duponchelle
mathieu at centricular.com
Wed May 29 16:44:16 EEST 2019
As suggested elsewhere, here's the output of git diff -w, I hope that helps :)
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 2bc5289d63..0162939399 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -547,8 +547,13 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
}
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->a53_cc) {
- side_data = av_frame_get_side_data(s->current_picture_ptr->f,
- AV_FRAME_DATA_A53_CC);
+ int i;
+
+ for (i = 0; i < s->current_picture_ptr->f->nb_side_data; i++) {
+ side_data = s->current_picture_ptr->f->side_data[i];
+ if (side_data->type != AV_FRAME_DATA_A53_CC)
+ continue;
+
if (side_data) {
if (side_data->size <= A53_MAX_CC_COUNT * 3 && side_data->size % 3 == 0) {
int i = 0;
@@ -575,6 +580,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
}
}
}
+ }
s->mb_y = 0;
ff_mpeg1_encode_slice_header(s);
On 5/13/19 3:39 PM, Carl Eugen Hoyos wrote:
> Am Mi., 10. Apr. 2019 um 13:26 Uhr schrieb Mathieu Duponchelle
> <mathieu at centricular.com>:
>
>> No problem
> I don't see an updated patch.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list