Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions shared/media-playback/media-playback/media.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,6 @@ void mp_media_next_video(mp_media_t *m, bool preload)
enum video_range_type new_range;
AVFrame *f = d->frame;

if (!f->width || !f->height) {
blog(LOG_ERROR, "MP: media frame width or height are zero ('%s': %" PRIu32 "x%" PRIu32 ")", m->path,
f->width, f->height);
return;
}

if (!preload) {
if (!mp_media_can_play_frame(m, d))
return;
Expand All @@ -400,6 +394,12 @@ void mp_media_next_video(mp_media_t *m, bool preload)
return;
}

if (!f->width || !f->height) {
blog(LOG_ERROR, "MP: media frame width or height are zero ('%s': %" PRIu32 "x%" PRIu32 ")", m->path,
f->width, f->height);
return;
}

bool flip = false;
if (m->swscale) {
int ret = sws_scale(m->swscale, (const uint8_t *const *)f->data, f->linesize, 0, f->height,
Expand Down
Loading