Opened 3 years ago

Last modified 2 years ago

#9144 new defect

ffmetadata has inconsistent escaping

Reported by: Federico Carboni Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: metadata, ffmetadata
Cc: Michael Lelli Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no



The backslash here is used to escape itself, not the following newline character. Yet the ffmetadata demuxer will read a key with value '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':
    key             : value\
    encoder         : Lavf58.45.100
$ ffprobe any.ffmeta
Input #0, ffmetadata, from 's.ffmeta':
    key             : value\
                    : encoder=Lavf58.45.100
# The encoder metadata property is gone.

Change History (1)

comment:1 by Michael Lelli, 2 years ago

Cc: Michael Lelli added

I've discovered if you use Windows-style newlines (\r\n) instead of Unix style (\n) you can avoid this bug.

Note: See TracTickets for help on using tickets.