summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-31 22:26:25 +0000
committerpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-31 22:26:25 +0000
commitfafd27da4622f1e02b0469a5e11dde07c1a49a57 (patch)
tree4c0126b65b7452775518f5e76f6306aa190b4116 /libmpcodecs
parent0265bf2065400411ff52f89a1a0faee16ba0c18b (diff)
downloadmpv-fafd27da4622f1e02b0469a5e11dde07c1a49a57.tar.bz2
mpv-fafd27da4622f1e02b0469a5e11dde07c1a49a57.tar.xz
Fix SVQ3 extradata handling so it works correctly with demux_lavf
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19284 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 5e05a27ba3..2ea90a0454 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -264,6 +264,18 @@ static int init(sh_video_t *sh){
avctx->skip_frame = str2AVDiscard(lavc_param_skip_frame_str);
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"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 */
@@ -312,14 +324,6 @@ static int init(sh_video_t *sh){
// printf("%X %X %d %d\n", extrahdr[0], extrahdr[1]);
break;
- case mmioFOURCC('S','V','Q','3'):
- if (!sh->ImageDesc)
- break;
- 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;
-
default:
if (!sh->bih || sh->bih->biSize <= sizeof(BITMAPINFOHEADER))
break;