Lines 25-30
Link Here
|
25 |
#include <alsa/asoundlib.h> |
25 |
#include <alsa/asoundlib.h> |
26 |
#include <alsa/pcm_external.h> |
26 |
#include <alsa/pcm_external.h> |
27 |
#include <alsa/pcm_plugin.h> |
27 |
#include <alsa/pcm_plugin.h> |
|
|
28 |
#include <libavutil/audioconvert.h> |
29 |
#include <libavutil/mem.h> |
28 |
#include AVCODEC_HEADER |
30 |
#include AVCODEC_HEADER |
29 |
|
31 |
|
30 |
struct a52_ctx { |
32 |
struct a52_ctx { |
Lines 429-435
Link Here
|
429 |
|
431 |
|
430 |
a52_free(rec); |
432 |
a52_free(rec); |
431 |
|
433 |
|
432 |
rec->avctx = avcodec_alloc_context(); |
434 |
rec->avctx = avcodec_alloc_context3(rec->codec); |
433 |
if (! rec->avctx) |
435 |
if (! rec->avctx) |
434 |
return -ENOMEM; |
436 |
return -ENOMEM; |
435 |
|
437 |
|
Lines 457-463
Link Here
|
457 |
} |
459 |
} |
458 |
#endif |
460 |
#endif |
459 |
|
461 |
|
460 |
if (avcodec_open(rec->avctx, rec->codec) < 0) |
462 |
if (avcodec_open2(rec->avctx, rec->codec, NULL) < 0) |
461 |
return -EINVAL; |
463 |
return -EINVAL; |
462 |
|
464 |
|
463 |
rec->inbuf = malloc(rec->avctx->frame_size * 2 * io->channels); |
465 |
rec->inbuf = malloc(rec->avctx->frame_size * 2 * io->channels); |