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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 10912080: Switch to AVIO instead of a custom FFmpeg URLProtocol handler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: AVIO! Created 8 years, 3 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/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 00d91f552bb7fd62689ce61ec91a048697130821..2de0bfddcb11c66b064cd26a38be816bfd877f2a 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -388,30 +388,4 @@ PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format) {
return PIX_FMT_NONE;
}
-void DestroyAVFormatContext(AVFormatContext* format_context) {
- DCHECK(format_context);
-
- // Iterate each stream and destroy each one of them.
- if (format_context->streams) {
- int streams = format_context->nb_streams;
- for (int i = 0; i < streams; ++i) {
- AVStream* stream = format_context->streams[i];
-
- // The conditions for calling avcodec_close():
- // 1. AVStream is alive.
- // 2. AVCodecContext in AVStream is alive.
- // 3. AVCodec in AVCodecContext is alive.
- // Notice that closing a codec context without prior avcodec_open2() will
- // result in a crash in FFmpeg.
- if (stream && stream->codec && stream->codec->codec) {
- stream->discard = AVDISCARD_ALL;
- avcodec_close(stream->codec);
- }
- }
- }
-
- // Then finally cleanup the format context.
- avformat_close_input(&format_context);
-}
-
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698