| 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
|
|
|