Browse code

dv1394: add a private option for channel.

Anton Khirnov authored on 2011/05/24 04:55:44
Showing 1 changed files
... ...
@@ -104,8 +104,6 @@ static int dv1394_read_header(AVFormatContext * context, AVFormatParameters * ap
104 104
 
105 105
     if (ap->channel)
106 106
         dv->channel = ap->channel;
107
-    else
108
-        dv->channel = DV1394_DEFAULT_CHANNEL;
109 107
 
110 108
     /* Open and initialize DV1394 device */
111 109
     dv->fd = open(context->filename, O_RDONLY);
... ...
@@ -238,6 +236,7 @@ static const AVOption options[] = {
238 238
     { "standard", "", offsetof(struct dv1394_data, format), FF_OPT_TYPE_INT, {.dbl = DV1394_NTSC}, DV1394_PAL, DV1394_NTSC, AV_OPT_FLAG_DECODING_PARAM, "standard" },
239 239
     { "PAL",      "", 0, FF_OPT_TYPE_CONST, {.dbl = DV1394_PAL},   0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
240 240
     { "NTSC",     "", 0, FF_OPT_TYPE_CONST, {.dbl = DV1394_NTSC},  0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
241
+    { "channel",  "", offsetof(struct dv1394_data, channel), FF_OPT_TYPE_INT, {.dbl = DV1394_DEFAULT_CHANNEL}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
241 242
     { NULL },
242 243
 };
243 244