Re: [MPlayer-dev-eng] [PATCH] fix failure to initialize screenshot filter
- Date: Sun, 3 Jul 2016 22:04:16 +0200
- From: Roberto Togni <rxt@xxxxxxxxx>
- Subject: Re: [MPlayer-dev-eng] [PATCH] fix failure to initialize screenshot filter
On Wed, 29 Jun 2016 12:26:28 +0200
"Thomas Kirsten" <Tho_Ki@xxxxxx> wrote:
> ffmpeg recently extended the verification logic in avcodec_open2, see
> The function now fails when timebase (in AVCodecContext) is not set
> properly. This essentially disables the screenshot filter as it does not
> set those members and therefor its PNG output context fails to initialize.
> When run as "mplayer -vf screenshot file", it prints those errors during
> the start:
> [png @ 0x81101000]The encoder timebase is not set.
> Could not open libavcodec PNG encoder
> FATAL: Cannot initialize video driver.
> The first one is from the new ffmpeg code, the others are from
> libmpcodecs/vf_screenshot.c. Pressing the screenshot button makes the
> program crash in "write_png" in the libmpcodecs/vf_screenshot.c.
> The patch sets the timebase field in libmpcodecs/vf_screenshot.c to 1/1
> (documentation states it should be 1/framerate, but a single screenshot
> doesn't have a framerate). It satisfies the new check in ffmpeg, the
> filter is initialized and making the screenshot works fine.
> I'm not sure whether the value 1/1 for the timebase is correct, someone
> knowing about avcodec_open2 should approve this.
MPlayer-dev-eng mailing list