diff --git a/modules/media/gtkffmediafile.c b/modules/media/gtkffmediafile.c index 7f6244224e..04737f7474 100644 --- a/modules/media/gtkffmediafile.c +++ b/modules/media/gtkffmediafile.c @@ -656,6 +656,9 @@ gtk_ff_media_file_play (GtkMediaStream *stream) { GtkFfMediaFile *video = GTK_FF_MEDIA_FILE (stream); + if (video->format_ctx == NULL) + return FALSE; + if (!gtk_media_stream_is_prepared (stream)) return TRUE; diff --git a/modules/media/gtkgstmediafile.c b/modules/media/gtkgstmediafile.c index 93162eae5b..afbf637bd3 100644 --- a/modules/media/gtkgstmediafile.c +++ b/modules/media/gtkgstmediafile.c @@ -245,6 +245,9 @@ gtk_gst_media_file_play (GtkMediaStream *stream) { GtkGstMediaFile *self = GTK_GST_MEDIA_FILE (stream); + if (self->player == NULL) + return FALSE; + gst_player_play (self->player); return TRUE;