[FFmpeg-devel] [PATCH] image2 bugfix for image2pipe

Peter Holik peter
Tue May 26 15:04:05 CEST 2009


>> >> ffmpeg -i a.png b.png
>> >> ffmpeg -f image2 -i a.png b.png
>> >> ffmpeg -f image2 -vcodec png -i a.png b.png
>> >>
>> >> works but
>> >>
>> >> ffmpeg -f image2pipe -vcodec png -i a.png b.png
>> >>
>> >> won't work because only 4096 bytes are returned from img_read_packet.
>> >>
>> >> My patch now returns the whole image.
>> >>

> cosmetics must be seperate from functional changes, its not
> possible to review patches with reasonable effort otherwise

01-image2-bugfix-for-image2pipe.patch contains the bugfix

02-image2-cosmetics-for-image2pipe.patch contains some cosmetics on
  img_read_packet -> "if(!s->is_pipe)" check is not needed anymore.


Well this is a bugfix for png and other codecs not having a AVCodecParser like pnm.

This works

cat a.ppm | ffmpeg -f image2pipe -vcodec ppm -i - a.png

but

cat a.png | ffmpeg -f image2pipe -vcodec png -i - a.png

won't without my patch.

cu Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-image2-bugfix-for-image2pipe.patch
Type: text/x-diff
Size: 1325 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090526/0b693873/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-image2-cosmetics-for-image2pipe.patch
Type: text/x-diff
Size: 2008 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090526/0b693873/attachment-0001.patch>



More information about the ffmpeg-devel mailing list