1518
1509
#if CONFIG_AVFILTER
1525
static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
1527
AVFilterContext *ctx = codec->opaque;
1528
AVFilterBufferRef *ref;
1529
int perms = AV_PERM_WRITE;
1530
int i, w, h, stride[4];
1534
if (codec->codec->capabilities & CODEC_CAP_NEG_LINESIZES)
1535
perms |= AV_PERM_NEG_LINESIZES;
1537
if (pic->buffer_hints & FF_BUFFER_HINTS_VALID) {
1538
if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE) perms |= AV_PERM_READ;
1539
if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE) perms |= AV_PERM_PRESERVE;
1540
if (pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) perms |= AV_PERM_REUSE2;
1542
if (pic->reference) perms |= AV_PERM_READ | AV_PERM_PRESERVE;
1546
avcodec_align_dimensions2(codec, &w, &h, stride);
1547
edge = codec->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width();
1551
if (!(ref = avfilter_get_video_buffer(ctx->outputs[0], perms, w, h)))
1554
pixel_size = av_pix_fmt_descriptors[ref->format].comp[0].step_minus1 + 1;
1555
ref->video->w = codec->width;
1556
ref->video->h = codec->height;
1557
for (i = 0; i < 4; i ++) {
1558
unsigned hshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->format].log2_chroma_w : 0;
1559
unsigned vshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->format].log2_chroma_h : 0;
1562
ref->data[i] += ((edge * pixel_size) >> hshift) + ((edge * ref->linesize[i]) >> vshift);
1564
pic->data[i] = ref->data[i];
1565
pic->linesize[i] = ref->linesize[i];
1568
pic->type = FF_BUFFER_TYPE_USER;
1569
pic->reordered_opaque = codec->reordered_opaque;
1570
if (codec->pkt) pic->pkt_pts = codec->pkt->pts;
1571
else pic->pkt_pts = AV_NOPTS_VALUE;
1575
static void input_release_buffer(AVCodecContext *codec, AVFrame *pic)
1577
memset(pic->data, 0, sizeof(pic->data));
1578
avfilter_unref_buffer(pic->opaque);
1581
static int input_reget_buffer(AVCodecContext *codec, AVFrame *pic)
1583
AVFilterBufferRef *ref = pic->opaque;
1585
if (pic->data[0] == NULL) {
1586
pic->buffer_hints |= FF_BUFFER_HINTS_READABLE;
1587
return codec->get_buffer(codec, pic);
1590
if ((codec->width != ref->video->w) || (codec->height != ref->video->h) ||
1591
(codec->pix_fmt != ref->format)) {
1592
av_log(codec, AV_LOG_ERROR, "Picture properties changed.\n");
1596
pic->reordered_opaque = codec->reordered_opaque;
1597
if (codec->pkt) pic->pkt_pts = codec->pkt->pts;
1598
else pic->pkt_pts = AV_NOPTS_VALUE;
1602
static int input_init(AVFilterContext *ctx, const char *args, void *opaque)
1604
FilterPriv *priv = ctx->priv;
1605
AVCodecContext *codec;
1606
if (!opaque) return -1;
1609
codec = priv->is->video_st->codec;
1610
codec->opaque = ctx;
1611
if (codec->codec->capabilities & CODEC_CAP_DR1) {
1613
codec->get_buffer = input_get_buffer;
1614
codec->release_buffer = input_release_buffer;
1615
codec->reget_buffer = input_reget_buffer;
1616
codec->thread_safe_callbacks = 1;
1619
priv->frame = avcodec_alloc_frame();
1624
static void input_uninit(AVFilterContext *ctx)
1626
FilterPriv *priv = ctx->priv;
1627
av_free(priv->frame);
1630
static int input_request_frame(AVFilterLink *link)
1632
FilterPriv *priv = link->src->priv;
1633
AVFilterBufferRef *picref;
1638
while (!(ret = get_video_frame(priv->is, priv->frame, &pts, &pkt)))
1639
av_free_packet(&pkt);
1643
if (priv->use_dr1) {
1644
picref = avfilter_ref_buffer(priv->frame->opaque, ~0);
1646
picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h);
1647
av_image_copy(picref->data, picref->linesize,
1648
priv->frame->data, priv->frame->linesize,
1649
picref->format, link->w, link->h);
1651
av_free_packet(&pkt);
1653
avfilter_copy_frame_props(picref, priv->frame);
1656
avfilter_start_frame(link, picref);
1657
avfilter_draw_slice(link, 0, link->h, 1);
1658
avfilter_end_frame(link);
1663
static int input_query_formats(AVFilterContext *ctx)
1665
FilterPriv *priv = ctx->priv;
1666
enum PixelFormat pix_fmts[] = {
1667
priv->is->video_st->codec->pix_fmt, PIX_FMT_NONE
1670
avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts));
1674
static int input_config_props(AVFilterLink *link)
1676
FilterPriv *priv = link->src->priv;
1677
AVCodecContext *c = priv->is->video_st->codec;
1680
link->h = c->height;
1681
link->time_base = priv->is->video_st->time_base;
1686
static AVFilter input_filter =
1688
.name = "avplay_input",
1690
.priv_size = sizeof(FilterPriv),
1693
.uninit = input_uninit,
1695
.query_formats = input_query_formats,
1697
.inputs = (AVFilterPad[]) {{ .name = NULL }},
1698
.outputs = (AVFilterPad[]) {{ .name = "default",
1699
.type = AVMEDIA_TYPE_VIDEO,
1700
.request_frame = input_request_frame,
1701
.config_props = input_config_props, },
1705
1510
static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters)
1707
1512
char sws_flags_str[128];
1513
char buffersrc_args[256];
1709
AVSinkContext avsink_ctx = { .pix_fmt = PIX_FMT_YUV420P };
1710
AVFilterContext *filt_src = NULL, *filt_out = NULL;
1711
snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);
1515
AVFilterContext *filt_src = NULL, *filt_out = NULL, *filt_format;
1516
AVCodecContext *codec = is->video_st->codec;
1518
snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%"PRId64, sws_flags);
1712
1519
graph->scale_sws_opts = av_strdup(sws_flags_str);
1714
if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src",
1715
NULL, is, graph)) < 0)
1717
if ((ret = avfilter_graph_create_filter(&filt_out, &avsink, "out",
1718
NULL, &avsink_ctx, graph)) < 0)
1521
snprintf(buffersrc_args, sizeof(buffersrc_args), "%d:%d:%d:%d:%d:%d:%d",
1522
codec->width, codec->height, codec->pix_fmt,
1523
is->video_st->time_base.num, is->video_st->time_base.den,
1524
codec->sample_aspect_ratio.num, codec->sample_aspect_ratio.den);
1527
if ((ret = avfilter_graph_create_filter(&filt_src,
1528
avfilter_get_by_name("buffer"),
1529
"src", buffersrc_args, NULL,
1532
if ((ret = avfilter_graph_create_filter(&filt_out,
1533
avfilter_get_by_name("buffersink"),
1534
"out", NULL, NULL, graph)) < 0)
1537
if ((ret = avfilter_graph_create_filter(&filt_format,
1538
avfilter_get_by_name("format"),
1539
"format", "yuv420p", NULL, graph)) < 0)
1541
if ((ret = avfilter_link(filt_format, 0, filt_out, 0)) < 0)
1721
1545
if (vfilters) {
1722
AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut));
1723
AVFilterInOut *inputs = av_malloc(sizeof(AVFilterInOut));
1546
AVFilterInOut *outputs = avfilter_inout_alloc();
1547
AVFilterInOut *inputs = avfilter_inout_alloc();
1725
1549
outputs->name = av_strdup("in");
1726
1550
outputs->filter_ctx = filt_src;
1788
1629
graph = avfilter_graph_alloc();
1789
1630
if ((ret = configure_video_filters(graph, is, vfilters)) < 0)
1632
filt_in = is->in_video_filter;
1791
1633
filt_out = is->out_video_filter;
1792
1634
last_w = is->video_st->codec->width;
1793
1635
last_h = is->video_st->codec->height;
1795
ret = get_filtered_video_frame(filt_out, frame, &picref, &tb);
1638
frame->pts = pts_int;
1640
FrameBuffer *buf = frame->opaque;
1641
AVFilterBufferRef *fb = avfilter_get_video_buffer_ref_from_arrays(
1642
frame->data, frame->linesize,
1643
AV_PERM_READ | AV_PERM_PRESERVE,
1644
frame->width, frame->height,
1647
avfilter_copy_frame_props(fb, frame);
1648
fb->buf->priv = buf;
1649
fb->buf->free = filter_release_buffer;
1652
av_buffersrc_buffer(filt_in, fb);
1655
av_buffersrc_write_frame(filt_in, frame);
1658
ret = av_buffersink_read(filt_out, &picref);
1664
avfilter_copy_buf_props(frame, picref);
1797
1666
pts_int = picref->pts;
1667
tb = filt_out->inputs[0]->time_base;
1798
1668
pos = picref->pos;
1799
1669
frame->opaque = picref;
1802
if (av_cmp_q(tb, is->video_st->time_base)) {
1803
av_unused int64_t pts1 = pts_int;
1804
pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base);
1805
av_dlog(NULL, "video_thread(): "
1806
"tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n",
1807
tb.num, tb.den, pts1,
1808
is->video_st->time_base.num, is->video_st->time_base.den, pts_int);
1671
if (av_cmp_q(tb, is->video_st->time_base)) {
1672
av_unused int64_t pts1 = pts_int;
1673
pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base);
1674
av_dlog(NULL, "video_thread(): "
1675
"tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n",
1676
tb.num, tb.den, pts1,
1677
is->video_st->time_base.num, is->video_st->time_base.den, pts_int);
1679
pts = pts_int * av_q2d(is->video_st->time_base);
1680
ret = output_picture2(is, frame, pts, pos);
1811
ret = get_video_frame(is, frame, &pts_int, &pkt);
1820
1683
pts = pts_int * av_q2d(is->video_st->time_base);
1823
ret = output_picture2(is, frame, pts, pos);
1825
1684
ret = output_picture2(is, frame, pts, pkt.pos);
1826
av_free_packet(&pkt);
2045
1908
data_size = av_samples_get_buffer_size(NULL, dec->channels,
2046
1909
is->frame->nb_samples,
2047
dec->sample_fmt, 1);
2049
if (dec->sample_fmt != is->audio_src_fmt) {
2050
if (is->reformat_ctx)
2051
av_audio_convert_free(is->reformat_ctx);
2052
is->reformat_ctx= av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1,
2053
dec->sample_fmt, 1, NULL, 0);
2054
if (!is->reformat_ctx) {
2055
fprintf(stderr, "Cannot convert %s sample format to %s sample format\n",
2056
av_get_sample_fmt_name(dec->sample_fmt),
2057
av_get_sample_fmt_name(AV_SAMPLE_FMT_S16));
2060
is->audio_src_fmt= dec->sample_fmt;
1910
is->frame->format, 1);
1912
audio_resample = is->frame->format != is->sdl_sample_fmt ||
1913
is->frame->channel_layout != is->sdl_channel_layout ||
1914
is->frame->sample_rate != is->sdl_sample_rate;
1916
resample_changed = is->frame->format != is->resample_sample_fmt ||
1917
is->frame->channel_layout != is->resample_channel_layout ||
1918
is->frame->sample_rate != is->resample_sample_rate;
1920
if ((!is->avr && audio_resample) || resample_changed) {
1923
avresample_close(is->avr);
1924
else if (audio_resample) {
1925
is->avr = avresample_alloc_context();
1927
fprintf(stderr, "error allocating AVAudioResampleContext\n");
1931
if (audio_resample) {
1932
av_opt_set_int(is->avr, "in_channel_layout", is->frame->channel_layout, 0);
1933
av_opt_set_int(is->avr, "in_sample_fmt", is->frame->format, 0);
1934
av_opt_set_int(is->avr, "in_sample_rate", is->frame->sample_rate, 0);
1935
av_opt_set_int(is->avr, "out_channel_layout", is->sdl_channel_layout, 0);
1936
av_opt_set_int(is->avr, "out_sample_fmt", is->sdl_sample_fmt, 0);
1937
av_opt_set_int(is->avr, "out_sample_rate", is->sdl_sample_rate, 0);
1939
if ((ret = avresample_open(is->avr)) < 0) {
1940
fprintf(stderr, "error initializing libavresample\n");
1944
is->resample_sample_fmt = is->frame->format;
1945
is->resample_channel_layout = is->frame->channel_layout;
1946
is->resample_sample_rate = is->frame->sample_rate;
2063
if (is->reformat_ctx) {
2064
const void *ibuf[6] = { is->frame->data[0] };
2066
int istride[6] = { av_get_bytes_per_sample(dec->sample_fmt) };
2067
int ostride[6] = { 2 };
2068
int len= data_size/istride[0];
2069
obuf[0] = av_realloc(is->audio_buf1, FFALIGN(len * ostride[0], 32));
1949
if (audio_resample) {
1951
int out_samples, out_size, out_linesize;
1952
int osize = av_get_bytes_per_sample(is->sdl_sample_fmt);
1953
int nb_samples = is->frame->nb_samples;
1955
out_size = av_samples_get_buffer_size(&out_linesize,
1958
is->sdl_sample_fmt, 0);
1959
tmp_out = av_realloc(is->audio_buf1, out_size);
2071
1961
return AVERROR(ENOMEM);
2073
is->audio_buf1 = obuf[0];
2074
if (av_audio_convert(is->reformat_ctx, obuf, ostride, ibuf, istride, len) < 0) {
2075
printf("av_audio_convert() failed\n");
1962
is->audio_buf1 = tmp_out;
1964
out_samples = avresample_convert(is->avr,
1966
out_linesize, nb_samples,
1968
is->frame->linesize[0],
1969
is->frame->nb_samples);
1970
if (out_samples < 0) {
1971
fprintf(stderr, "avresample_convert() failed\n");
2078
1974
is->audio_buf = is->audio_buf1;
2079
/* FIXME: existing code assume that data_size equals framesize*channels*2
2080
remove this legacy cruft */
2081
data_size = len * 2;
1975
data_size = out_samples * osize * is->sdl_channels;
2083
1977
is->audio_buf = is->frame->data[0];
2955
2868
static const OptionDef options[] = {
2956
2869
#include "cmdutils_common_opts.h"
2957
{ "x", HAS_ARG, { (void*)opt_width }, "force displayed width", "width" },
2958
{ "y", HAS_ARG, { (void*)opt_height }, "force displayed height", "height" },
2959
{ "s", HAS_ARG | OPT_VIDEO, { (void*)opt_frame_size }, "set frame size (WxH or abbreviation)", "size" },
2960
{ "fs", OPT_BOOL, { (void*)&is_full_screen }, "force full screen" },
2961
{ "an", OPT_BOOL, { (void*)&audio_disable }, "disable audio" },
2962
{ "vn", OPT_BOOL, { (void*)&video_disable }, "disable video" },
2963
{ "ast", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&wanted_stream[AVMEDIA_TYPE_AUDIO] }, "select desired audio stream", "stream_number" },
2964
{ "vst", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&wanted_stream[AVMEDIA_TYPE_VIDEO] }, "select desired video stream", "stream_number" },
2965
{ "sst", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&wanted_stream[AVMEDIA_TYPE_SUBTITLE] }, "select desired subtitle stream", "stream_number" },
2966
{ "ss", HAS_ARG, { (void*)&opt_seek }, "seek to a given position in seconds", "pos" },
2967
{ "t", HAS_ARG, { (void*)&opt_duration }, "play \"duration\" seconds of audio/video", "duration" },
2968
{ "bytes", OPT_INT | HAS_ARG, { (void*)&seek_by_bytes }, "seek by bytes 0=off 1=on -1=auto", "val" },
2969
{ "nodisp", OPT_BOOL, { (void*)&display_disable }, "disable graphical display" },
2970
{ "f", HAS_ARG, { (void*)opt_format }, "force format", "fmt" },
2971
{ "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, { (void*)opt_frame_pix_fmt }, "set pixel format", "format" },
2972
{ "stats", OPT_BOOL | OPT_EXPERT, { (void*)&show_status }, "show status", "" },
2973
{ "debug", HAS_ARG | OPT_EXPERT, { (void*)opt_debug }, "print specific debug info", "" },
2974
{ "bug", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&workaround_bugs }, "workaround bugs", "" },
2975
{ "vismv", HAS_ARG | OPT_EXPERT, { (void*)opt_vismv }, "visualize motion vectors", "" },
2976
{ "fast", OPT_BOOL | OPT_EXPERT, { (void*)&fast }, "non spec compliant optimizations", "" },
2977
{ "genpts", OPT_BOOL | OPT_EXPERT, { (void*)&genpts }, "generate pts", "" },
2978
{ "drp", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&decoder_reorder_pts }, "let decoder reorder pts 0=off 1=on -1=auto", ""},
2979
{ "lowres", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&lowres }, "", "" },
2980
{ "skiploop", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_loop_filter }, "", "" },
2981
{ "skipframe", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_frame }, "", "" },
2982
{ "skipidct", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_idct }, "", "" },
2983
{ "idct", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&idct }, "set idct algo", "algo" },
2984
{ "er", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&error_recognition }, "set error detection threshold (0-4)", "threshold" },
2985
{ "ec", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&error_concealment }, "set error concealment options", "bit_mask" },
2986
{ "sync", HAS_ARG | OPT_EXPERT, { (void*)opt_sync }, "set audio-video sync. type (type=audio/video/ext)", "type" },
2987
{ "autoexit", OPT_BOOL | OPT_EXPERT, { (void*)&autoexit }, "exit at the end", "" },
2988
{ "exitonkeydown", OPT_BOOL | OPT_EXPERT, { (void*)&exit_on_keydown }, "exit on key down", "" },
2989
{ "exitonmousedown", OPT_BOOL | OPT_EXPERT, { (void*)&exit_on_mousedown }, "exit on mouse down", "" },
2990
{ "loop", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&loop }, "set number of times the playback shall be looped", "loop count" },
2991
{ "framedrop", OPT_BOOL | OPT_EXPERT, { (void*)&framedrop }, "drop frames when cpu is too slow", "" },
2992
{ "window_title", OPT_STRING | HAS_ARG, { (void*)&window_title }, "set window title", "window title" },
2870
{ "x", HAS_ARG, { .func_arg = opt_width }, "force displayed width", "width" },
2871
{ "y", HAS_ARG, { .func_arg = opt_height }, "force displayed height", "height" },
2872
{ "s", HAS_ARG | OPT_VIDEO, { .func_arg = opt_frame_size }, "set frame size (WxH or abbreviation)", "size" },
2873
{ "fs", OPT_BOOL, { &is_full_screen }, "force full screen" },
2874
{ "an", OPT_BOOL, { &audio_disable }, "disable audio" },
2875
{ "vn", OPT_BOOL, { &video_disable }, "disable video" },
2876
{ "ast", OPT_INT | HAS_ARG | OPT_EXPERT, { &wanted_stream[AVMEDIA_TYPE_AUDIO] }, "select desired audio stream", "stream_number" },
2877
{ "vst", OPT_INT | HAS_ARG | OPT_EXPERT, { &wanted_stream[AVMEDIA_TYPE_VIDEO] }, "select desired video stream", "stream_number" },
2878
{ "sst", OPT_INT | HAS_ARG | OPT_EXPERT, { &wanted_stream[AVMEDIA_TYPE_SUBTITLE] }, "select desired subtitle stream", "stream_number" },
2879
{ "ss", HAS_ARG, { .func_arg = opt_seek }, "seek to a given position in seconds", "pos" },
2880
{ "t", HAS_ARG, { .func_arg = opt_duration }, "play \"duration\" seconds of audio/video", "duration" },
2881
{ "bytes", OPT_INT | HAS_ARG, { &seek_by_bytes }, "seek by bytes 0=off 1=on -1=auto", "val" },
2882
{ "nodisp", OPT_BOOL, { &display_disable }, "disable graphical display" },
2883
{ "f", HAS_ARG, { .func_arg = opt_format }, "force format", "fmt" },
2884
{ "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, { .func_arg = opt_frame_pix_fmt }, "set pixel format", "format" },
2885
{ "stats", OPT_BOOL | OPT_EXPERT, { &show_status }, "show status", "" },
2886
{ "debug", HAS_ARG | OPT_EXPERT, { .func_arg = opt_debug }, "print specific debug info", "" },
2887
{ "bug", OPT_INT | HAS_ARG | OPT_EXPERT, { &workaround_bugs }, "workaround bugs", "" },
2888
{ "vismv", HAS_ARG | OPT_EXPERT, { .func_arg = opt_vismv }, "visualize motion vectors", "" },
2889
{ "fast", OPT_BOOL | OPT_EXPERT, { &fast }, "non spec compliant optimizations", "" },
2890
{ "genpts", OPT_BOOL | OPT_EXPERT, { &genpts }, "generate pts", "" },
2891
{ "drp", OPT_INT | HAS_ARG | OPT_EXPERT, { &decoder_reorder_pts }, "let decoder reorder pts 0=off 1=on -1=auto", ""},
2892
{ "skiploop", OPT_INT | HAS_ARG | OPT_EXPERT, { &skip_loop_filter }, "", "" },
2893
{ "skipframe", OPT_INT | HAS_ARG | OPT_EXPERT, { &skip_frame }, "", "" },
2894
{ "skipidct", OPT_INT | HAS_ARG | OPT_EXPERT, { &skip_idct }, "", "" },
2895
{ "idct", OPT_INT | HAS_ARG | OPT_EXPERT, { &idct }, "set idct algo", "algo" },
2896
{ "ec", OPT_INT | HAS_ARG | OPT_EXPERT, { &error_concealment }, "set error concealment options", "bit_mask" },
2897
{ "sync", HAS_ARG | OPT_EXPERT, { .func_arg = opt_sync }, "set audio-video sync. type (type=audio/video/ext)", "type" },
2898
{ "autoexit", OPT_BOOL | OPT_EXPERT, { &autoexit }, "exit at the end", "" },
2899
{ "exitonkeydown", OPT_BOOL | OPT_EXPERT, { &exit_on_keydown }, "exit on key down", "" },
2900
{ "exitonmousedown", OPT_BOOL | OPT_EXPERT, { &exit_on_mousedown }, "exit on mouse down", "" },
2901
{ "loop", OPT_INT | HAS_ARG | OPT_EXPERT, { &loop }, "set number of times the playback shall be looped", "loop count" },
2902
{ "framedrop", OPT_BOOL | OPT_EXPERT, { &framedrop }, "drop frames when cpu is too slow", "" },
2903
{ "infbuf", OPT_BOOL | OPT_EXPERT, { &infinite_buffer }, "don't limit the input buffer size (useful with realtime streams)", "" },
2904
{ "window_title", OPT_STRING | HAS_ARG, { &window_title }, "set window title", "window title" },
2993
2905
#if CONFIG_AVFILTER
2994
{ "vf", OPT_STRING | HAS_ARG, { (void*)&vfilters }, "video filters", "filter list" },
2906
{ "vf", OPT_STRING | HAS_ARG, { &vfilters }, "video filters", "filter list" },
2996
{ "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, { (void*)&rdftspeed }, "rdft speed", "msecs" },
2997
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, { (void*)opt_default }, "generic catch all option", "" },
2908
{ "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, { &rdftspeed }, "rdft speed", "msecs" },
2909
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, { opt_default }, "generic catch all option", "" },
2998
2910
{ "i", 0, { NULL }, "avconv compatibility dummy option", ""},