aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-30 22:47:08 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-30 22:47:08 +0000
commit6299a22904d00d6d628eaa7ab0c648f70dfa970d (patch)
treeb157207268cce89deb29d099d3dccfb5f88fc1eb /ffplay.c
parent029ddf333c8f36ddc65c91cb6f18ae310d2bd1ab (diff)
downloadffmpeg-6299a22904d00d6d628eaa7ab0c648f70dfa970d.tar.gz
Fix AVFormat AVOprions.
Originally committed as revision 21561 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 69588d6465..eaabefd481 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1881,6 +1881,8 @@ static int decode_thread(void *arg)
AVFormatParameters params, *ap = &params;
int eof=0;
+ ic = avformat_alloc_context();
+
video_index = -1;
audio_index = -1;
subtitle_index = -1;
@@ -1893,11 +1895,14 @@ static int decode_thread(void *arg)
memset(ap, 0, sizeof(*ap));
+ ap->prealloced_context = 1;
ap->width = frame_width;
ap->height= frame_height;
ap->time_base= (AVRational){1, 25};
ap->pix_fmt = frame_pix_fmt;
+ set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM);
+
err = av_open_input_file(&ic, is->filename, is->iformat, 0, ap);
if (err < 0) {
print_error(is->filename, err);