[MPlayer-cvslog] r36469 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Wed Oct 16 19:47:17 CEST 2013
Author: reimar
Date: Wed Oct 16 19:47:16 2013
New Revision: 36469
Log:
vd_ffmpeg: catch invalid aspect from FFmpeg.
This avoids endless reinitialization with buggy FFmpeg
codecs like HEVC that set aspect to be n/0, which compares
unequal to itself.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Wed Oct 16 19:20:31 2013 (r36468)
+++ trunk/libmpcodecs/vd_ffmpeg.c Wed Oct 16 19:47:16 2013 (r36469)
@@ -568,6 +568,10 @@ static void draw_slice(struct AVCodecCon
static void update_configuration(sh_video_t *sh, enum AVPixelFormat pix_fmt) {
vd_ffmpeg_ctx *ctx = sh->context;
AVCodecContext *avctx = ctx->avctx;
+ if (!avctx->sample_aspect_ratio.den) {
+ mp_msg(MSGT_DECVIDEO, MSGL_WARN, "FFmpeg bug: Invalid aspect\n");
+ avctx->sample_aspect_ratio.den = 1;
+ }
// it is possible another vo buffers to be used after vo config()
// lavc reset its buffers on width/heigh change but not on aspect change!!!
if (av_cmp_q(avctx->sample_aspect_ratio, ctx->last_sample_aspect_ratio) ||
More information about the MPlayer-cvslog
mailing list