path: root/stream
diff options
authorUoti Urpala <>2012-01-28 13:41:36 +0200
committerUoti Urpala <>2012-02-01 22:46:27 +0200
commitdb8cdc73e38c3490389212d94ae9b92dfddd5975 (patch)
treeee6486888b90afe0e5a42a8e0c080366f5c8a7e5 /stream
parent637d6b7c8e12b4f71ccbc64f73a402b573e71697 (diff)
Update Libav API uses
Change various code to use the latest Libav API. The libavcodec error_recognition setting has been removed and replaced with different semantics. I removed the "--lavdopts=er=<value>" option accordingly, as I don't think it's widely enough used to be worth attempting to emulate the old option semantics using the new API. A new option with the new semantics can be added later if needed. Libav dropped APIs that were necessary with all Libav versions until quite recently (like setting avctx->age), and it would thus not be possible to keep compatibility with previous Libav versions without adding workarounds. The new APIs also had some bugs/limitations in the recent Libav release 0.8, and it would not work fully (at least some avcodec options would not be set correctly). Because of those issues, this commit makes no attempt to maintain compatibility with anything but the latest Libav git head. Hopefully the required fixes and improvements will be included in a following Libav point release.
Diffstat (limited to 'stream')
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/stream_ffmpeg.c b/stream/stream_ffmpeg.c
index 74e9db791c..a76b9e5f3b 100644
--- a/stream/stream_ffmpeg.c
+++ b/stream/stream_ffmpeg.c
@@ -101,9 +101,9 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format)
int dummy;
if (mode == STREAM_READ)
- flags = URL_RDONLY;
+ flags = AVIO_FLAG_READ;
else if (mode == STREAM_WRITE)
- flags = URL_WRONLY;
+ flags = AVIO_FLAG_WRITE;
else {
mp_msg(MSGT_OPEN, MSGL_ERR, "[ffmpeg] Unknown open mode %d\n", mode);