]> git.sesse.net Git - ffmpeg/blobdiff - avplay.c
idctdsp: Add global function pointers for {add|put}_pixels_clamped functions
[ffmpeg] / avplay.c
index b70ee54c7b904b4073fb7d8f2c2c3be506bcde01..816733fe43119caeb3b5e54b08f99e199dcb6ffb 100644 (file)
--- a/avplay.c
+++ b/avplay.c
@@ -1323,6 +1323,8 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
 
     vp = &is->pictq[is->pictq_windex];
 
+    vp->sar = src_frame->sample_aspect_ratio;
+
     /* alloc or resize hardware picture buffer */
     if (!vp->bmp || vp->reallocate ||
 #if CONFIG_AVFILTER
@@ -1386,7 +1388,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
         is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx,
             vp->width, vp->height, vp->pix_fmt, vp->width, vp->height,
             dst_pix_fmt, sws_flags, NULL, NULL, NULL);
-        if (is->img_convert_ctx == NULL) {
+        if (!is->img_convert_ctx) {
             fprintf(stderr, "Cannot initialize the conversion context\n");
             exit(1);
         }