]> git.sesse.net Git - ffmpeg/blobdiff - ffplay.c
forgot to apply this chunk appearently, no, i dont really remember where it came...
[ffmpeg] / ffplay.c
index 5bf7e52b2d5aacc375a0ec15456d0cc5df07ebf1..5105ad1d48c5c373258316bc28b366cb6d57e517 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -330,7 +330,8 @@ static void video_image_display(VideoState *is)
     vp = &is->pictq[is->pictq_rindex];
     if (vp->bmp) {
         /* XXX: use variable in the frame */
-        aspect_ratio = is->video_st->codec.aspect_ratio;
+        aspect_ratio = av_q2d(is->video_st->codec.sample_aspect_ratio) 
+            * is->video_st->codec.width / is->video_st->codec.height;;
         if (aspect_ratio <= 0.0)
             aspect_ratio = (float)is->video_st->codec.width / 
                 (float)is->video_st->codec.height;
@@ -1715,7 +1716,7 @@ int main(int argc, char **argv)
     flags |= SDL_INIT_EVENTTHREAD; /* Not supported on win32 */
 #endif
     if (SDL_Init (flags)) {
-        fprintf(stderr, "Could not initialize SDL - exiting\n");
+        fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
         exit(1);
     }