Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-11-25 18:45:58 +0400
committerStefano Sabatini <stefasab@gmail.com>2012-11-30 03:01:53 +0400
commit08d0969c1402ccec4dce44bd430128fb59d7b790 (patch)
tree60a36c18b0619a928b74081552f7f3a6bc7efec8 /libavdevice
parent0b28abf903cd1fd61ba4a06009cd2cb7cc40e6e0 (diff)
lavu/opt: change the way default pixel and sample format value is set
Use the i64 field rather than the string value. Using a string to set a default sample/pixel format is weird, also the new interface 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. In order to save backward compatibility with mixed libraries in case libavutil is updated but not the other libraries, some ifdeffery hacks are added. Note that the version check is only performed when class->version != 0, since if it is not defined then we assume that no version was defined and the class is not affected by the change. We will luckily get rid of the hack at the next major bump.
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/dshow.c2
-rw-r--r--libavdevice/version.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 3bd90b0c6f..26a4f15086 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, {.i64 = AV_PIX_FMT_NONE}, 0, 0, DEC },
{ "framerate", "set video frame rate", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
{ "sample_rate", "set audio sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, DEC },
{ "sample_size", "set audio sample size", OFFSET(sample_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 16, DEC },
diff --git a/libavdevice/version.h b/libavdevice/version.h
index a17818080b..d5d5da5123 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -29,7 +29,7 @@
#define LIBAVDEVICE_VERSION_MAJOR 54
#define LIBAVDEVICE_VERSION_MINOR 3
-#define LIBAVDEVICE_VERSION_MICRO 100
+#define LIBAVDEVICE_VERSION_MICRO 101
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
LIBAVDEVICE_VERSION_MINOR, \