summaryrefslogtreecommitdiff
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-26 14:22:10 +0100
committerAnton Khirnov <anton@khirnov.net>2013-11-29 14:19:47 +0100
commite2ceb17642f374a7df8f1f5d3d2b2446525bc7fb (patch)
tree49606a2320f2facd49af01c8debaada49d32923c /libavcodec/h263dec.c
parentb452d5ae866942cec00aa1432fe29498b38b49fc (diff)
mpeg4videodec: move mpeg4-specific post-frame-decode code from h264dec to mpeg4videodec
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 9c8d35508d..6c2f322bab 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -593,40 +593,9 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
s->er.error_status_table[s->mb_num - 1] = ER_MB_ERROR;
assert(s->bitstream_buffer_size == 0);
- /* divx 5.01+ bistream reorder stuff */
- if (s->codec_id == AV_CODEC_ID_MPEG4 && s->divx_packed) {
- int current_pos = get_bits_count(&s->gb) >> 3;
- int startcode_found = 0;
-
- if (buf_size - current_pos > 5) {
- int i;
- for (i = current_pos; i < buf_size - 3; i++)
- if (buf[i] == 0 &&
- buf[i + 1] == 0 &&
- buf[i + 2] == 1 &&
- buf[i + 3] == 0xB6) {
- startcode_found = 1;
- break;
- }
- }
- if (s->gb.buffer == s->bitstream_buffer && buf_size > 7 &&
- s->xvid_build >= 0) { // xvid style
- startcode_found = 1;
- current_pos = 0;
- }
- if (startcode_found) {
- av_fast_malloc(&s->bitstream_buffer,
- &s->allocated_bitstream_buffer_size,
- buf_size - current_pos +
- FF_INPUT_BUFFER_PADDING_SIZE);
- if (!s->bitstream_buffer)
- return AVERROR(ENOMEM);
- memcpy(s->bitstream_buffer, buf + current_pos,
- buf_size - current_pos);
- s->bitstream_buffer_size = buf_size - current_pos;
- }
- }
+ if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4)
+ ff_mpeg4_frame_end(avctx, buf, buf_size);
intrax8_decoded:
ff_er_frame_end(&s->er);