[FFmpeg-devel] postprocess.c: filter name needs to be double 0 terminated

Piotr Kaczuba p.kaczuba at attika.ath.cx
Sat May 28 19:24:41 CEST 2011


Since the switch from strncpy() to av_strlcpy() in 
pp_get_mode_by_name_and_quality() in libpostproc/postprocess.c (commit 
1a5e4fd8c5b99478b4e08a69261930bb12aa948b), the replacement of short 
filter names doesn't work any more. The way the replacement algorithm 
works, it requires that the whole filter name string be double 0 
terminated. Strncpy() took care of that quasi automatically by filling 
the remainder of the buffer with zeroes, but av_strlcpy() does not. In 
the case of mplayer, the error message is:

$ mplayer -vf pp a.avi
...
Opening video filter: [pp]
1 errors in postprocess string "de"
...

Attached patch fixes it.

-- 
Cheers,
Piotr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: postprocess.diff
Type: text/x-diff
Size: 509 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110528/ecca764f/attachment.bin>


More information about the ffmpeg-devel mailing list