[PATCH] avcodec/libxavs: remove global header code
The code does not work, also the resulting files cannot be played when one fixes the code so it doesnt crash Signed-off-by: Michael Niedermayer <michaelni@gmx.at> --- libavcodec/libxavs.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index ffe3411..91507f4 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -200,7 +200,6 @@ static av_cold int XAVS_close(AVCodecContext *avctx) { XavsContext *x4 = avctx->priv_data; - av_freep(&avctx->extradata); av_free(x4->sei); av_freep(&x4->pts_buffer); @@ -346,9 +345,6 @@ static av_cold int XAVS_init(AVCodecContext *avctx) x4->params.i_threads = avctx->thread_count; x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT; - if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) - x4->params.b_repeat_headers = 0; - x4->enc = xavs_encoder_open(&x4->params); if (!x4->enc) return -1; @@ -360,32 +356,6 @@ static av_cold int XAVS_init(AVCodecContext *avctx) if (!avctx->coded_frame) return AVERROR(ENOMEM); - /* TAG: Do we have GLOBAL HEADER in AVS */ - /* We Have PPS and SPS in AVS */ - if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) { - xavs_nal_t *nal; - int nnal, s, i, size; - uint8_t *p; - - s = xavs_encoder_headers(x4->enc, &nal, &nnal); - - avctx->extradata = p = av_malloc(s); - for (i = 0; i < nnal; i++) { - /* Don't put the SEI in extradata. */ - if (nal[i].i_type == NAL_SEI) { - x4->sei = av_malloc( 5 + nal[i].i_payload * 4 / 3 ); - if (xavs_nal_encode(x4->sei, &x4->sei_size, 1, nal + i) < 0) - return -1; - - continue; - } - size = xavs_nal_encode(p, &s, 1, nal + i); - if (size < 0) - return -1; - p += size; - } - avctx->extradata_size = p - avctx->extradata; - } return 0; } -- 1.7.9.5
On Fri, Jan 17, 2014 at 07:53:49PM +0100, Michael Niedermayer wrote:
The code does not work, also the resulting files cannot be played when one fixes the code so it doesnt crash
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> --- libavcodec/libxavs.c | 30 ------------------------------ 1 file changed, 30 deletions(-)
applied an equivalent patch [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML.
participants (1)
-
Michael Niedermayer