Skip to content

Commit

Permalink
removed use of deprecated function to the new one
Browse files Browse the repository at this point in the history
  • Loading branch information
dethof.alexander committed Oct 20, 2015
1 parent 7ae4586 commit f7e6710
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/film.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,12 @@ int film::process() {
/*
* Allocate current and previous video frames
*/
pFrame = avcodec_alloc_frame();
pFrame = av_frame_alloc();
// RGB:
pFrameRGB = avcodec_alloc_frame(); // current frame
pFrameRGBprev = avcodec_alloc_frame(); // previous frame
pFrameRGB = av_frame_alloc(); // current frame
pFrameRGBprev = av_frame_alloc(); // previous frame
// YUV:
pFrameYUV = avcodec_alloc_frame(); // current frame
pFrameYUV = av_frame_alloc(); // current frame

/*
* Allocate memory for the pixels of a picture and setup the AVPicture
Expand Down Expand Up @@ -589,7 +589,7 @@ void film::process_audio() {
len = packet.size;

while (len > 0) {
this->audio_buf = avcodec_alloc_frame();
this->audio_buf = av_frame_alloc();
// (short *) av_fast_realloc (this->audio_buf, &samples_size, FFMAX
// (packet.size, AVCODEC_MAX_AUDIO_FRAME_SIZE));
data_size = samples_size;
Expand Down

1 comment on commit f7e6710

@fohletex
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avcodec_alloc_frame function is deprecated and thus does not compile with newer versions of ffmpeg; could not find in the documentation a hint for which ffmpeg version the software is built so I updated it

Please sign in to comment.