You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Hiding nb_side_data depreciation warnings for now (but I added a TODO for a reminder)
This commit is contained in:
@@ -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<int32_t *>(sd->data));
|
||||
if (isnan(rotation))
|
||||
|
||||
Reference in New Issue
Block a user