]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/g2meet.c
shorten: Use a checked bytestream reader for the wave header
[ffmpeg] / libavcodec / g2meet.c
index 43888dc8e382dc5d275681bdba0f98865dfedcc9..199e8af08009bf995588f1343237787960c8b25b 100644 (file)
@@ -440,7 +440,7 @@ static int g2m_init_buffers(G2MContext *c)
 {
     int aligned_height;
 
-    if (!c->framebuf || c->old_width < c->width || c->height < c->height) {
+    if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) {
         c->framebuf_stride = FFALIGN(c->width * 3, 16);
         aligned_height     = FFALIGN(c->height,    16);
         av_free(c->framebuf);
@@ -835,7 +835,7 @@ static av_cold int g2m_decode_init(AVCodecContext *avctx)
         return AVERROR(ENOMEM);
     }
 
-    avctx->pix_fmt     = PIX_FMT_RGB24;
+    avctx->pix_fmt = AV_PIX_FMT_RGB24;
 
     return 0;
 }