diff options
author | wm4 <wm4@nowhere> | 2012-09-01 20:14:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-09-18 21:04:46 +0200 |
commit | dd3e1217eb2086a9d759332bdca8b9399b565d72 (patch) | |
tree | 445ed03113e3032ac70f46075604789d7138add3 /libmpcodecs | |
parent | f0b2c3dcd79885ed6c2e407b9d6d474968da8813 (diff) | |
download | mpv-dd3e1217eb2086a9d759332bdca8b9399b565d72.tar.bz2 mpv-dd3e1217eb2086a9d759332bdca8b9399b565d72.tar.xz |
demuxer: remove ImageDesc field
This was needed by the now-removed mov demuxer for QuickTime video, or
to be more specific, the Sorenson 3 video codec. QuickTime can
(probably) still decoded by libavcodec, but this field is not needed
for this.
The reference in demux_mkv was apparently for decoding QuickTime in
Matroska, using binary QuickTime codecs (QTX stuff). It's possible that
this has been broken with the binary codecs removal (see commit
aebfbbf2bdd), because it removed related code from demux_mkv. On the
other hand, the code section in question was enabled only if binary
win32 codecs were enabled. The win32 codec loader worked on 32 bit x86
only. This means QuickTime-in-Matroska was broken on all other
architectures, including 64 bit x86. Despite being possibly broken on a
major platform, nobody has complained about it yet, and since I couldn't
find a sample of such a mkv file, so don't bother with it.
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 21c24a2702..d36e4122a0 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -277,19 +277,6 @@ static int init(sh_video_t *sh) "libavcodec.size: %d x %d\n", avctx->width, avctx->height); switch (sh->format) { case mmioFOURCC('S','V','Q','3'): - /* SVQ3 extradata can show up as sh->ImageDesc if demux_mov is used, or - * in the phony AVI header if demux_lavf is used. The first case is - * handled here; the second case falls through to the next section. */ - if (sh->ImageDesc) { - avctx->extradata_size = (*(int *)sh->ImageDesc) - sizeof(int); - avctx->extradata = av_mallocz(avctx->extradata_size + - FF_INPUT_BUFFER_PADDING_SIZE); - memcpy(avctx->extradata, ((int *)sh->ImageDesc) + 1, - avctx->extradata_size); - break; - } - /* fallthrough */ - case mmioFOURCC('A','V','R','n'): case mmioFOURCC('M','J','P','G'): /* AVRn stores huffman table in AVI header */ @@ -419,14 +406,6 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt) width = avctx->width; height = avctx->height; - // HACK! - // if sh->ImageDesc is non-NULL, it means we decode QuickTime(tm) video. - // use dimensions from BIH to avoid black borders at the right and bottom. - if (sh->bih && sh->ImageDesc) { - width = sh->bih->biWidth >> avctx->lowres; - height = sh->bih->biHeight >> avctx->lowres; - } - /* Reconfiguring filter/VO chain may invalidate direct rendering buffers * we have allocated for libavcodec (including the VDPAU HW decoding * case). Is it guaranteed that the code below only triggers in a situation |