diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-08 20:55:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-08 20:55:11 +0200 |
commit | 5d6a40bc747da93bd4ee41a446c35fc60a399671 (patch) | |
tree | 613c91012a37b3646f1575955d6124ffc4fdefe7 /libavcodec/mpeg12.c | |
parent | 4f043c8a119101ffe8f6a57b18a47f602a350c30 (diff) | |
parent | 9294f538e924dcb8f3938e4e3476340f1e5b552f (diff) | |
download | ffmpeg-5d6a40bc747da93bd4ee41a446c35fc60a399671.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rtsp: Don't use av_malloc(0) if there are no streams
rtsp: Don't use uninitialized data if there are no streams
vaapi: mpeg2: fix slice_vertical_position calculation.
hwaccel: mpeg2: decode first field, if requested.
cosmetics: Fix indentation
rtsp: Don't expose the MS-RTSP RTX data stream to the caller
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index d81fa9dd0f..ea19b819cc 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1635,6 +1635,12 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) return -1; } + if (s->avctx->hwaccel && + (s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { + if (s->avctx->hwaccel->end_frame(s->avctx) < 0) + av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode first field\n"); + } + for (i = 0; i < 4; i++) { s->current_picture.f.data[i] = s->current_picture_ptr->f.data[i]; if (s->picture_structure == PICT_BOTTOM_FIELD) { |