mirror of https://github.com/mpv-player/mpv
219e1ab1e7
mplayer (and all forks) use a single FourCC field to map codecs. This is what sh_video->format and sh_audio->format is used for. Basically it's a key into the codecs.conf table to find out what decoder to use. (There's only one video codec and one major audio codec left - both libavcodec. But we still have to deal with mapping coming from non-libavformat demuxers.) It seems this causes some video codecs to fail, such as WV1F in AVI [1]. demux_lavf generally throws away the codec_tag from libavformat if the codec is MPEG-in-AVI. There are probably other cases like this. Add a hack to enforce passing the correct codec tag when only ffmpeg demuxers and decoders involved. Note: the sample [1] needs to be flipped. With --demuxer=avi, this is done correctly, because unlike demux_lavf, the demuxer uses the FourCC directly for the sh_video->format tag, and finds the correct codecs.conf entry (which contains the flip flag). We could just add a "whitelist" of codec tags which can be passed through to sh_video->format, but I don't want to do that just for such an obscure format as the sample at hand. Note 2: when demux_lavf is used, the AVCodecContext could be passed directly to vd_ffmpeg/ad_ffmpeg. The code to convert to/from the internal mplayer stream headers is probably still needed, as there are non-ffmpeg demuxers and audio decoders. [1] http://samples.mplayerhq.hu/V-codecs/WV1F/AVI/title2.avi |
||
---|---|---|
.. | ||
ad.c | ||
ad.h | ||
ad_dvdpcm.c | ||
ad_ffmpeg.c | ||
ad_internal.h | ||
ad_mpg123.c | ||
ad_pcm.c | ||
ad_spdif.c | ||
dec_audio.c | ||
dec_audio.h | ||
dec_video.c | ||
dec_video.h | ||
img_format.c | ||
img_format.h | ||
mp_image.c | ||
mp_image.h | ||
mpc_info.h | ||
pullup.c | ||
pullup.h | ||
vd.c | ||
vd.h | ||
vd_ffmpeg.c | ||
vf.c | ||
vf.h | ||
vf_ass.c | ||
vf_crop.c | ||
vf_delogo.c | ||
vf_divtc.c | ||
vf_dlopen.c | ||
vf_dlopen.h | ||
vf_down3dright.c | ||
vf_dsize.c | ||
vf_eq2.c | ||
vf_expand.c | ||
vf_flip.c | ||
vf_format.c | ||
vf_gradfun.c | ||
vf_hqdn3d.c | ||
vf_ilpack.c | ||
vf_mirror.c | ||
vf_noformat.c | ||
vf_noise.c | ||
vf_phase.c | ||
vf_pp.c | ||
vf_pullup.c | ||
vf_rotate.c | ||
vf_scale.c | ||
vf_scale.h | ||
vf_screenshot.c | ||
vf_softpulldown.c | ||
vf_stereo3d.c | ||
vf_swapuv.c | ||
vf_unsharp.c | ||
vf_vo.c | ||
vf_yadif.c | ||
vfcap.h |