[FFmpeg-trac] #9214(avformat:new): ffmetadata decoding handles lines ending with backslashes incorrectly
FFmpeg
trac at avcodec.org
Mon May 3 17:44:29 EEST 2021
#9214: ffmetadata decoding handles lines ending with backslashes incorrectly
-------------------------------------+-------------------------------------
Reporter: Michael | Type: defect
Lelli |
Status: new | Priority: normal
Component: avformat | Version:
| unspecified
Keywords: ffmetadata | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
In ffmetadata files, if a line ends with an escaped backslash the next
line return is also escaped when it should not be. This only happens when
using Unix newlines (\n). Using Windows newlines (\r\n) does not show this
issue.
How to reproduce:
Create this ffmpeg tag file with Unix newlines:
{{{
;FFMETADATA1
test1=qwer\\
test2=asdf
}}}
Write, then read the metadata from a file:
{{{
ffmpeg -y -i in.mp4 -i meta.txt -map_metadata 1 -movflags
use_metadata_tags -codec copy -f mp4 out.mp4
ffmpeg -i out.mp4 -f ffmetadata -
}}}
Expected results (and results with Windows newlines):
{{{
;FFMETADATA1
...
test1=qwer\\
test2=asdf
}}}
Actual results:
{{{
;FFMETADATA1
...
test1=qwer\\\
test2\=asdf
}}}
Version:
{{{
ffmpeg version 2021-05-02-git-5541cffa17-full_build-www.gyan.dev Copyright
(c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-
w32threads --disable-autodetect --enable-fontconfig --enable-iconv
--enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-
libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh
--enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca
--enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e
--enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
--enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
--enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
--enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
--enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-
libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-
libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
--enable-libmp3lame --enable-libshine --enable-libtheora --enable-
libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm
--enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-
libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-
libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9214>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list