Skip to content

Commit 5115707

Browse files
committed
pass stream not codecCtx to decoders
1 parent 4b0d3f6 commit 5115707

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

jni/libmediaplayer/decoder_video.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ extern "C" {
99

1010
#define TAG "FFMpegVideoDecoder"
1111

12-
DecoderVideo::DecoderVideo(AVCodecContext* codec_ctx,
13-
struct DecoderVideoConfig* config) : IDecoder(NULL)
12+
DecoderVideo::DecoderVideo(AVStream* stream,
13+
struct DecoderVideoConfig* config) : IDecoder(stream)
1414
{
15-
mCodecCtx = codec_ctx;
1615
mConfig = config;
1716
}
1817

jni/libmediaplayer/decoder_video.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ struct DecoderVideoConfig
88
int width;
99
int height;
1010
struct SwsContext* img_convert_ctx;
11-
AVFrame* frame;
1211
};
1312

1413
class DecoderVideo : public IDecoder
1514
{
1615
public:
17-
DecoderVideo(AVCodecContext* codec_ctx,
16+
DecoderVideo(AVStream* stream,
1817
struct DecoderVideoConfig* config);
1918

2019
~DecoderVideo();

0 commit comments

Comments
 (0)