[FFmpeg-devel] [PATCH] lavu/opt: change the way default pixel and sample format value is set

Stefano Sabatini stefasab at gmail.com
Sun Nov 25 16:34:48 CET 2012


On date Sunday 2012-11-25 16:10:05 +0100, Michael Niedermayer encoded:
> On Sun, Nov 25, 2012 at 04:00:20PM +0100, Stefano Sabatini wrote:
> > Use the i64 field rather than the string value. Use a string to set a
> > default sample/pixel format is weird, also this is more consistent with
> > the rest of the API.
> > 
> 
> > This is technically an API break, but hopefully there are no applications
> > using this feature outside of FFmpeg.
> > 
> > TODO: bump micro
> > ---
> >  libavdevice/dshow.c |    2 +-
> >  libavutil/opt.c     |   10 +++++++---
> >  2 files changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> > index 3bd90b0..3e141e8 100644
> > --- a/libavdevice/dshow.c
> > +++ b/libavdevice/dshow.c
> > @@ -1018,7 +1018,7 @@ static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
> >  #define DEC AV_OPT_FLAG_DECODING_PARAM
> >  static const AVOption options[] = {
> >      { "video_size", "set video size given a string such as 640x480 or hd720.", OFFSET(requested_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC },
> > -    { "pixel_format", "set video pixel format", OFFSET(pixel_format), AV_OPT_TYPE_PIXEL_FMT, {.str = NULL}, 0, 0, DEC },
> 
> > +    { "pixel_format", "set video pixel format", OFFSET(pixel_format), AV_OPT_TYPE_PIXEL_FMT, {.str = AV_PIX_FMT_NONE}, 0, 0, DEC },
>                                                                                                  ^^^^
> this doesnt look right

Updated.
-- 
FFmpeg = Fundamentalist Fundamentalist Magnificient Power Evangelical Gigant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-lavu-opt-change-the-way-default-pixel-and-sample-for.patch
Type: text/x-diff
Size: 4673 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121125/d3d6c2ba/attachment.bin>


More information about the ffmpeg-devel mailing list