diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/media/gtkffmediafile.c | 8 | ||||
-rw-r--r-- | modules/media/gtkgstpaintable.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/modules/media/gtkffmediafile.c b/modules/media/gtkffmediafile.c index 46011e00d1..4ae1621575 100644 --- a/modules/media/gtkffmediafile.c +++ b/modules/media/gtkffmediafile.c @@ -114,6 +114,14 @@ gtk_ff_media_file_paintable_get_current_image (GdkPaintable *paintable) { GtkFfMediaFile *video = GTK_FF_MEDIA_FILE (paintable); + if (gtk_video_frame_ffmpeg_is_empty (&video->current_frame)) + { + if (video->codec_ctx) + return gdk_paintable_new_empty (video->codec_ctx->width, video->codec_ctx->height); + else + return gdk_paintable_new_empty (0, 0); + } + return GDK_PAINTABLE (g_object_ref (video->current_frame.texture)); } diff --git a/modules/media/gtkgstpaintable.c b/modules/media/gtkgstpaintable.c index 980459a34d..838b688db5 100644 --- a/modules/media/gtkgstpaintable.c +++ b/modules/media/gtkgstpaintable.c @@ -57,8 +57,7 @@ gtk_gst_paintable_paintable_get_current_image (GdkPaintable *paintable) if (self->image) return GDK_PAINTABLE (g_object_ref (self->image)); - g_warning ("FIXME: return empty something here"); - return NULL; + return gdk_paintable_new_empty (0, 0); } static int |