Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Commit

Permalink
Updating deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Schebb committed Feb 13, 2014
1 parent 6e9db8f commit f16f0d0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tutorial01.c
Expand Up @@ -102,10 +102,10 @@ int main(int argc, char *argv[]) {
return -1; // Could not open codec

// Allocate video frame
pFrame=avcodec_alloc_frame();
pFrame=av_frame_alloc();

// Allocate an AVFrame structure
pFrameRGB=avcodec_alloc_frame();
pFrameRGB=av_frame_alloc();
if(pFrameRGB==NULL)
return -1;

Expand Down
2 changes: 1 addition & 1 deletion tutorial02.c
Expand Up @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) {
return -1; // Could not open codec

// Allocate video frame
pFrame=avcodec_alloc_frame();
pFrame=av_frame_alloc();

// Make a screen to put our video
#ifndef __DARWIN__
Expand Down
2 changes: 1 addition & 1 deletion tutorial03.c
Expand Up @@ -302,7 +302,7 @@ int main(int argc, char *argv[]) {
return -1; // Could not open codec

// Allocate video frame
pFrame=avcodec_alloc_frame();
pFrame=av_frame_alloc();

// Make a screen to put our video

Expand Down
2 changes: 1 addition & 1 deletion tutorial04.c
Expand Up @@ -442,7 +442,7 @@ int video_thread(void *arg) {
int frameFinished;
AVFrame *pFrame;

pFrame = avcodec_alloc_frame();
pFrame = av_frame_alloc();

for(;;) {
if(packet_queue_get(&is->videoq, packet, 1) < 0) {
Expand Down
4 changes: 2 additions & 2 deletions tutorial05.c
Expand Up @@ -545,7 +545,7 @@ int video_thread(void *arg) {
AVFrame *pFrame;
double pts;

pFrame = avcodec_alloc_frame();
pFrame = av_frame_alloc();

for(;;) {
if(packet_queue_get(&is->videoq, packet, 1) < 0) {
Expand Down Expand Up @@ -653,7 +653,7 @@ int stream_component_open(VideoState *is, int stream_index) {
NULL,
NULL
);
codecCtx->get_buffer = our_get_buffer;
codecCtx->get_buffer2 = our_get_buffer;
codecCtx->release_buffer = our_release_buffer;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions tutorial06.c
Expand Up @@ -656,7 +656,7 @@ int video_thread(void *arg) {
AVFrame *pFrame;
double pts;

pFrame = avcodec_alloc_frame();
pFrame = av_frame_alloc();

for(;;) {
if(packet_queue_get(&is->videoq, packet, 1) < 0) {
Expand Down Expand Up @@ -771,7 +771,7 @@ int stream_component_open(VideoState *is, int stream_index) {
NULL,
NULL
);
codecCtx->get_buffer = our_get_buffer;
codecCtx->get_buffer2 = our_get_buffer;
codecCtx->release_buffer = our_release_buffer;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions tutorial07.c
Expand Up @@ -667,7 +667,7 @@ int video_thread(void *arg) {
AVFrame *pFrame;
double pts;

pFrame = avcodec_alloc_frame();
pFrame = av_frame_alloc();

for(;;) {
if(packet_queue_get(&is->videoq, packet, 1) < 0) {
Expand Down Expand Up @@ -785,7 +785,7 @@ int stream_component_open(VideoState *is, int stream_index) {
NULL,
NULL
);
codecCtx->get_buffer = our_get_buffer;
codecCtx->get_buffer2 = our_get_buffer;
codecCtx->release_buffer = our_release_buffer;

break;
Expand Down

0 comments on commit f16f0d0

Please sign in to comment.