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

Michael Niedermayer michaelni
Tue May 26 14:45:06 CEST 2009


On Tue, May 26, 2009 at 02:46:31PM +0200, Peter Holik wrote:
> > On Tue, May 26, 2009 at 01:21:46PM +0200, Peter Holik wrote:
> >> Hi!
> >>
> >>
> >> 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.
> >>
> >>
> >> Request for comment.
> > [...]
> >
> >> -        /* loop over input */
> >> -        if (s1->loop_input && s->img_number > s->img_last) {
> >> -            s->img_number = s->img_first;
> >> -        }
> >> -        if (av_get_frame_filename(filename, sizeof(filename),
> >> -                                  s->path, s->img_number)<0 && s->img_number > 1)
> >> +    /* loop over input */
> >> +    if (s1->loop_input && s->img_number > s->img_last) {
> >> +        s->img_number = s->img_first;
> >> +    }
> >> +    if (av_get_frame_filename(filename, sizeof(filename),
> >> +                              s->path, s->img_number)<0 && s->img_number > 1)
> >
> > cosmetics
> 
> @@ -418,7 +442,7 @@ AVInputFormat image2pipe_demuxer = {
>      sizeof(VideoData),
>      NULL, /* no probe */
>      img_read_header,
> -    img_read_packet,
> +    img_read_packet_pipe,
> 
> 
> Because i divided img_read_packet into 2 functions
> 
> img_read_packet and img_read_packet_pipe
> 
> therefore i did some cosmetics on img_read_packet ->
> 
> "if(!s->is_pipe)" check is not needed anymore.

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

also, maybe you want to read our development guide/patch checklist

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090526/a237379b/attachment.pgp>



More information about the ffmpeg-devel mailing list