changeset 9162:e7d9670a725c 8u51-b06

RT-40155: Better live stream streaming
author stayer
date Mon, 30 Mar 2015 11:02:25 +0300
parents 52a5820948fa
children 9623a72711f8
files modules/media/src/main/native/gstreamer/plugins/av/videodecoder.c
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/media/src/main/native/gstreamer/plugins/av/videodecoder.c	Mon Mar 23 21:54:01 2015 -0700
+++ b/modules/media/src/main/native/gstreamer/plugins/av/videodecoder.c	Mon Mar 30 11:02:25 2015 +0300
@@ -288,12 +288,19 @@
 {
     BaseDecoder *base = BASEDECODER(decoder);
 
+#if NEW_CODEC_ID
+    int width = base->frame->width;
+    int height = base->frame->height;
+#else
+    int width = base->context->width;
+    int height = base->context->height;
+#endif // NEW_CODEC_ID 
+    
     if (GST_PAD_CAPS(base->srcpad) == NULL ||
-        decoder->width != base->context->width ||
-        decoder->height != base->context->height)
+        decoder->width != width || decoder->height != height)
     {
-        decoder->width = base->context->width;
-        decoder->height = base->context->height;
+        decoder->width = width;
+        decoder->height = height;
 
         decoder->discont = (GST_PAD_CAPS(base->srcpad) != NULL);