Reorder decoder functions

This will make further commits more readable.
This commit is contained in:
Romain Vimont 2021-04-11 15:01:05 +02:00
parent 5980183a33
commit 5beb7d6c02

View file

@ -6,11 +6,6 @@
#include "video_buffer.h" #include "video_buffer.h"
#include "util/log.h" #include "util/log.h"
void
decoder_init(struct decoder *decoder, struct video_buffer *vb) {
decoder->video_buffer = vb;
}
bool bool
decoder_open(struct decoder *decoder, const AVCodec *codec) { decoder_open(struct decoder *decoder, const AVCodec *codec) {
decoder->codec_ctx = avcodec_alloc_context3(codec); decoder->codec_ctx = avcodec_alloc_context3(codec);
@ -63,3 +58,8 @@ decoder_push(struct decoder *decoder, const AVPacket *packet) {
} }
return true; return true;
} }
void
decoder_init(struct decoder *decoder, struct video_buffer *vb) {
decoder->video_buffer = vb;
}