diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 6d8f9ccd..c23680ed 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -555,12 +555,16 @@ void FFmpegReader::Open() { } // If "rotate" isn't already set, extract it from the video stream's side data. + // TODO: nb_side_data is depreciated, and I'm not sure the preferred way to do this if (info.metadata.find("rotate") == info.metadata.end()) { for (unsigned int i = 0; i < pFormatCtx->nb_streams; i++) { if (pFormatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" for (int j = 0; j < pFormatCtx->streams[i]->nb_side_data; j++) { - // Use the address-of operator to get a pointer to the j-th element. + // Get the j-th side data element. AVPacketSideData *sd = &pFormatCtx->streams[i]->side_data[j]; +#pragma GCC diagnostic pop if (sd->type == AV_PKT_DATA_DISPLAYMATRIX && sd->size >= 9 * sizeof(int32_t)) { double rotation = -av_display_rotation_get(reinterpret_cast(sd->data)); if (isnan(rotation))