[FFmpeg-devel] [PATCH] avcodec/dv_profile: dv files with wrong dsf flag - detect via buf_size

Mark Plomer not-implemented at mark-plomer.de
Sat Jan 16 15:40:03 EET 2021


Trying to fix https://trac.ffmpeg.org/ticket/8333

Some of my old DV AVI files have the DSF-Flag of frames set to 0, 
although it is PAL (I think they were rendered with Ulead Media Studio 
Pro) ... this causes ffmpeg/VLC-player to produce/play corrupted video.

In other players/editors it works fine including:

- VirtualDub
- Windows Media Player
- AVCutty
- Ulead Media Studio Pro (very old)

I had a look at VirtualDub ... there the PAL/NTSC detection is based on 
the frame rate from AVISTREAMINFO header (dwRate/dwScale) - see 
https://github.com/Pavuucek/VirtualDub/blob/f47ebd2536f0034b048180d0b9cb9bde0ab10c73/src/VirtualDub/source/VideoSource.cpp#L1211

As I don't know, how to access the AVI header info inside 
dvvideo_decode_frame()/ff_dv_frame_profile(), I tried another workaround 
by checking the buf_size against the dv_profile.

It works fine now, but I don't know, if this is really the best solution ...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avcodec-dv_profile-dv-files-with-wrong-dsf-flag.patch
Type: text/x-patch
Size: 1062 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210116/6190df8e/attachment.bin>


More information about the ffmpeg-devel mailing list