History

avcodec/mpeg12dec: Pass Mpeg1Context* in mpeg_field_start()

Avoids a cast.

Andreas Rheinhardt committed 2 years ago

Commit 9bb35cf1 parent c703a511 file · +3 −3Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mpeg12dec.c+3−3
@@ -1278,10 +1278,10 @@ static int mpeg_decode_picture_coding_extension(Mpeg1Context *s1) · 1277 unmodified lines
1278 return 0;1278 return 0;
1279}1279}
1280 1280
1281static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)1281static int mpeg_field_start(Mpeg1Context *s1, const uint8_t *buf, int buf_size)
1282{1282{
1283 MpegEncContext *s = &s1->mpeg_enc_ctx;
1283 AVCodecContext *avctx = s->avctx;1284 AVCodecContext *avctx = s->avctx;
1284 Mpeg1Context *s1 = (Mpeg1Context *) s;
1285 int ret;1285 int ret;
1286 1286
1287 if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) {1287 if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) {
@@ -2460,7 +2460,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 1172 unmodified lines
2460 if (s->first_slice) {2460 if (s->first_slice) {
2461 skip_frame = 0;2461 skip_frame = 0;
2462 s->first_slice = 0;2462 s->first_slice = 0;
2463 if ((ret = mpeg_field_start(s2, buf, buf_size)) < 0)2463 if ((ret = mpeg_field_start(s, buf, buf_size)) < 0)
2464 return ret;2464 return ret;
2465 }2465 }
2466 if (!s2->cur_pic.ptr) {2466 if (!s2->cur_pic.ptr) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t