1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 09:32:40 +00:00

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
aebfbbf2bd), 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.
This commit is contained in:
wm4 2012-09-01 20:14:42 +02:00
parent f0b2c3dcd7
commit dd3e1217eb
3 changed files with 0 additions and 23 deletions

View File

@ -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

View File

@ -1266,7 +1266,6 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track,
sh_v->disp_w = track->v_dwidth;
sh_v->disp_h = track->v_dheight;
}
sh_v->ImageDesc = NULL;
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] Aspect: %f\n", sh_v->aspect);
sh_v->ds = demuxer->video;

View File

@ -160,7 +160,6 @@ typedef struct sh_video {
// win32-compatible codec parameters:
AVIStreamHeader video;
BITMAPINFOHEADER *bih;
void *ImageDesc; // for quicktime codecs
} sh_video_t;
typedef struct sh_sub {