[FFmpeg-trac] #9144(avformat:new): ffmetadata has inconsistent escaping

FFmpeg trac at avcodec.org
Tue Mar 9 00:28:48 EET 2021


#9144: ffmetadata has inconsistent escaping
-------------------------------------+-------------------------------------
             Reporter:               |                     Type:  defect
  federicocarboni                    |
               Status:  new          |                 Priority:  normal
            Component:  avformat     |                  Version:  git-
             Keywords:               |  master
  metadata,ffmetadata                |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 {{{
 ;FFMETADATA1
 key=value\\
 key2=value
 }}}
 The backslash here is used to escape itself, not the following newline
 character. Yet the ffmetadata demuxer will read a key with value
 'value\\\nkey2=value'.

 This behavior can also be observed by creating an ffmeta file with ffmpeg
 and probing it with ffprobe.
 {{{
 # Double backslash for terminal escaping
 $ ffmpeg -metadata key=value\\ any.ffmeta
 ...
 Output #0, ffmetadata, to 'any.ffmeta':
   Metadata:
     key             : value\
     encoder         : Lavf58.45.100
 $ ffprobe any.ffmeta
 ...
 Input #0, ffmetadata, from 's.ffmeta':
   Metadata:
     key             : value\
                     : encoder=Lavf58.45.100
 # The encoder metadata property is gone.
 ...
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9144>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list