Avoids a cast.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1278,10 +1278,10 @@ static int mpeg_decode_picture_coding_extension(Mpeg1Context *s1) · 1277 unmodified lines | ||
| 1278 | 1278 | return 0; |
| 1279 | 1279 | } |
| 1280 | 1280 | |
| 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) | |
| 1282 | 1282 | { |
| 1283 | + MpegEncContext *s = &s1->mpeg_enc_ctx; | |
| 1283 | 1284 | AVCodecContext *avctx = s->avctx; |
| 1284 | − Mpeg1Context *s1 = (Mpeg1Context *) s; | |
| 1285 | 1285 | int ret; |
| 1286 | 1286 | |
| 1287 | 1287 | if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) { |
| @@ -2460,7 +2460,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 1172 unmodified lines | ||
| 2460 | 2460 | if (s->first_slice) { |
| 2461 | 2461 | skip_frame = 0; |
| 2462 | 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 | 2464 | return ret; |
| 2465 | 2465 | } |
| 2466 | 2466 | if (!s2->cur_pic.ptr) { |