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;
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);
}