[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bino-list] [PATCH 3/4] Replace all instances of avcodec_alloc_frame() w
From: |
Vittorio Giovara |
Subject: |
[Bino-list] [PATCH 3/4] Replace all instances of avcodec_alloc_frame() with av_frame_alloc() |
Date: |
Wed, 18 Dec 2013 16:03:08 +0100 |
---
src/media_object.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/media_object.cpp b/src/media_object.cpp
index 71c4e0c..591f2ed 100644
--- a/src/media_object.cpp
+++ b/src/media_object.cpp
@@ -932,8 +932,8 @@ void media_object::open(const std::string &url, const
device_request &dev_reques
_ffmpeg->video_packets.push_back(AVPacket());
av_init_packet(&(_ffmpeg->video_packets[j]));
_ffmpeg->video_decode_threads.push_back(video_decode_thread(_url,
_ffmpeg, j));
- _ffmpeg->video_frames.push_back(avcodec_alloc_frame());
- _ffmpeg->video_buffered_frames.push_back(avcodec_alloc_frame());
+ _ffmpeg->video_frames.push_back(av_frame_alloc());
+ _ffmpeg->video_buffered_frames.push_back(av_frame_alloc());
enum PixelFormat frame_fmt =
(_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
? PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt);
int frame_bufsize = (avpicture_get_size(frame_fmt,
@@ -950,7 +950,7 @@ void media_object::open(const std::string &url, const
device_request &dev_reques
// Initialize things needed for software pixel format
conversion
int sws_bufsize = avpicture_get_size(PIX_FMT_BGRA,
_ffmpeg->video_codec_ctxs[j]->width,
_ffmpeg->video_codec_ctxs[j]->height);
- _ffmpeg->video_sws_frames.push_back(avcodec_alloc_frame());
+ _ffmpeg->video_sws_frames.push_back(av_frame_alloc());
_ffmpeg->video_sws_buffers.push_back(static_cast<uint8_t
*>(av_malloc(sws_bufsize)));
if (!_ffmpeg->video_sws_frames[j] ||
!_ffmpeg->video_sws_buffers[j])
{
--
1.7.9.5