|
|
|
@ -155,7 +155,7 @@ static void audio_encode_example(const char *filename) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* frame containing input raw audio */ |
|
|
|
|
frame = avcodec_alloc_frame(); |
|
|
|
|
frame = av_frame_alloc(); |
|
|
|
|
if (!frame) { |
|
|
|
|
fprintf(stderr, "could not allocate audio frame\n"); |
|
|
|
|
exit(1); |
|
|
|
@ -268,7 +268,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) |
|
|
|
|
int got_frame = 0; |
|
|
|
|
|
|
|
|
|
if (!decoded_frame) { |
|
|
|
|
if (!(decoded_frame = avcodec_alloc_frame())) { |
|
|
|
|
if (!(decoded_frame = av_frame_alloc())) { |
|
|
|
|
fprintf(stderr, "out of memory\n"); |
|
|
|
|
exit(1); |
|
|
|
|
} |
|
|
|
@ -334,7 +334,7 @@ static void video_encode_example(const char *filename) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
c = avcodec_alloc_context3(codec); |
|
|
|
|
picture= avcodec_alloc_frame(); |
|
|
|
|
picture = av_frame_alloc(); |
|
|
|
|
|
|
|
|
|
/* put sample parameters */ |
|
|
|
|
c->bit_rate = 400000; |
|
|
|
@ -479,7 +479,7 @@ static void video_decode_example(const char *outfilename, const char *filename) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
c = avcodec_alloc_context3(codec); |
|
|
|
|
picture= avcodec_alloc_frame(); |
|
|
|
|
picture = av_frame_alloc(); |
|
|
|
|
|
|
|
|
|
if(codec->capabilities&CODEC_CAP_TRUNCATED) |
|
|
|
|
c->flags|= CODEC_FLAG_TRUNCATED; /* we do not send complete frames */ |
|
|
|
|