ffplay: demuxer specific options support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
10
ffplay.c
10
ffplay.c
@@ -2381,10 +2381,18 @@ static int read_thread(void *arg)
|
|||||||
ap->height= frame_height;
|
ap->height= frame_height;
|
||||||
ap->time_base= (AVRational){1, 25};
|
ap->time_base= (AVRational){1, 25};
|
||||||
ap->pix_fmt = frame_pix_fmt;
|
ap->pix_fmt = frame_pix_fmt;
|
||||||
|
ic->flags |= AVFMT_FLAG_PRIV_OPT;
|
||||||
|
|
||||||
set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
|
|
||||||
|
|
||||||
err = av_open_input_file(&ic, is->filename, is->iformat, 0, ap);
|
err = av_open_input_file(&ic, is->filename, is->iformat, 0, ap);
|
||||||
|
if (err >= 0) {
|
||||||
|
set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
|
||||||
|
err = av_demuxer_open(ic, ap);
|
||||||
|
if(err < 0){
|
||||||
|
avformat_free_context(ic);
|
||||||
|
ic= NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
print_error(is->filename, err);
|
print_error(is->filename, err);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
Reference in New Issue
Block a user