Originally committed as revision 21561 to svn://svn.ffmpeg.org/ffmpeg/trunk
Michael Niedermayer authored on 2010/01/31 07:47:08... | ... |
@@ -1881,6 +1881,8 @@ static int decode_thread(void *arg) |
1881 | 1881 |
AVFormatParameters params, *ap = ¶ms; |
1882 | 1882 |
int eof=0; |
1883 | 1883 |
|
1884 |
+ ic = avformat_alloc_context(); |
|
1885 |
+ |
|
1884 | 1886 |
video_index = -1; |
1885 | 1887 |
audio_index = -1; |
1886 | 1888 |
subtitle_index = -1; |
... | ... |
@@ -1893,11 +1895,14 @@ static int decode_thread(void *arg) |
1893 | 1893 |
|
1894 | 1894 |
memset(ap, 0, sizeof(*ap)); |
1895 | 1895 |
|
1896 |
+ ap->prealloced_context = 1; |
|
1896 | 1897 |
ap->width = frame_width; |
1897 | 1898 |
ap->height= frame_height; |
1898 | 1899 |
ap->time_base= (AVRational){1, 25}; |
1899 | 1900 |
ap->pix_fmt = frame_pix_fmt; |
1900 | 1901 |
|
1902 |
+ set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM); |
|
1903 |
+ |
|
1901 | 1904 |
err = av_open_input_file(&ic, is->filename, is->iformat, 0, ap); |
1902 | 1905 |
if (err < 0) { |
1903 | 1906 |
print_error(is->filename, err); |