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

Unified · Split

libavcodec/mpeg12dec.c+3−3
@@ -1278,10 +1278,10 @@ static int mpeg_decode_picture_coding_extension(Mpeg1Context *s1) · 1277 unmodified lines
12781278 return 0;
12791279 }
12801280
1281−static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
1281+static int mpeg_field_start(Mpeg1Context *s1, const uint8_t *buf, int buf_size)
12821282 {
1283+ MpegEncContext *s = &s1->mpeg_enc_ctx;
12831284 AVCodecContext *avctx = s->avctx;
1284− Mpeg1Context *s1 = (Mpeg1Context *) s;
12851285 int ret;
12861286
12871287 if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) {
@@ -2460,7 +2460,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 1172 unmodified lines
24602460 if (s->first_slice) {
24612461 skip_frame = 0;
24622462 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)
24642464 return ret;
24652465 }
24662466 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