audio_frame_que: simplify

Also update libav->ffmpeg as theres pretty much no code left from libav.
The new code is faster, requires fewer mallocs and less memory. Its
also half the number of lines of code.

This code is not 100% identical in behavior to the previous, but the
differences appear to be rather limitations of the previous design
than intended though i could be wrong of course.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-04-11 20:14:56 +02:00
parent 364c71c80e
commit 36583d23bd
2 changed files with 51 additions and 103 deletions

View file

@ -27,15 +27,15 @@
typedef struct AudioFrame {
int64_t pts;
int duration;
struct AudioFrame *next;
} AudioFrame;
typedef struct AudioFrameQueue {
AVCodecContext *avctx;
int64_t next_pts;
int remaining_delay;
int remaining_samples;
AudioFrame *frame_queue;
AudioFrame *frames;
unsigned frame_count;
unsigned frame_alloc;
} AudioFrameQueue;
/**