Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(927)

Unified Diff: media/filters/ffmpeg_glue.cc

Issue 9317096: Fix media code to work with new ffmpeg. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fixes. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/ffmpeg_glue.cc
diff --git a/media/filters/ffmpeg_glue.cc b/media/filters/ffmpeg_glue.cc
index bd5590151fdf83319be9fb9cfbc7a0f5799cf7f1..853ff093e7aaaa820752f090400b829d30dde819 100644
--- a/media/filters/ffmpeg_glue.cc
+++ b/media/filters/ffmpeg_glue.cc
@@ -23,7 +23,7 @@ static int OpenContext(URLContext* h, const char* filename, int flags) {
return AVERROR(EIO);
h->priv_data = protocol;
- h->flags = URL_RDONLY;
+ h->flags = AVIO_FLAG_READ;
h->is_streamed = protocol->IsStreaming();
return 0;
}
@@ -118,6 +118,7 @@ static const char kProtocol[] = "http";
static URLProtocol kFFmpegURLProtocol = {
kProtocol,
&OpenContext,
+ NULL, // url_open2
&ReadContext,
&WriteContext,
&SeekContext,
@@ -129,8 +130,7 @@ FFmpegGlue::FFmpegGlue() {
av_log_set_level(AV_LOG_QUIET);
// Register our protocol glue code with FFmpeg.
- avcodec_init();
- av_register_protocol2(&kFFmpegURLProtocol, sizeof(kFFmpegURLProtocol));
+ ffurl_register_protocol(&kFFmpegURLProtocol, sizeof(kFFmpegURLProtocol));
av_lockmgr_register(&LockManagerOperation);
// Now register the rest of FFmpeg.

Powered by Google App Engine
This is Rietveld 408576698