diff options
author | Michael Niedermayer <[email protected]> | 2013-05-12 12:41:03 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2013-05-12 12:41:03 +0200 |
commit | 1ace588f4a94fa607a42971b59483447647c4727 (patch) | |
tree | 3101a09642a0d5fbffa5dddc7af2fdc82a0885a2 | |
parent | 50a3442120e685963649417a6455ce90cf45b653 (diff) | |
parent | fc6825ebb6585138e8ee2bb3484a04542c5d8b6a (diff) |
Merge commit 'fc6825ebb6585138e8ee2bb3484a04542c5d8b6a' into release/1.1
* commit 'fc6825ebb6585138e8ee2bb3484a04542c5d8b6a':
vp8: Fix pthread_cond and pthread_mutex leaks
configure: Refactor dxva2api.h dependency declarations
flvdec: read audio sample size and channels metadata
flvdec: use the correct audio codec id when parsing metadata
Conflicts:
configure
Merged-by: Michael Niedermayer <[email protected]>
-rwxr-xr-x | configure | 13 | ||||
-rw-r--r-- | libavcodec/vp8.c | 4 | ||||
-rw-r--r-- | libavformat/flvdec.c | 12 |
3 files changed, 21 insertions, 8 deletions
@@ -1781,14 +1781,15 @@ zmbv_encoder_select="zlib" # hardware accelerators crystalhd_deps="libcrystalhd_libcrystalhd_if_h" +dxva2_deps="dxva2api_h" vaapi_deps="va_va_h" vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" h263_vaapi_hwaccel_select="vaapi h263_decoder" h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser" -h264_dxva2_hwaccel_deps="dxva2api_h" -h264_dxva2_hwaccel_select="dxva2 h264_decoder" +h264_dxva2_hwaccel_deps="dxva2" +h264_dxva2_hwaccel_select="h264_decoder" h264_vaapi_hwaccel_select="vaapi h264_decoder" h264_vda_decoder_select="vda h264_parser h264_decoder" h264_vda_hwaccel_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" @@ -1798,8 +1799,8 @@ mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder" mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder" mpeg1_vdpau_hwaccel_select="vdpau mpeg1video_decoder" mpeg2_crystalhd_decoder_select="crystalhd" -mpeg2_dxva2_hwaccel_deps="dxva2api_h" -mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder" +mpeg2_dxva2_hwaccel_deps="dxva2" +mpeg2_dxva2_hwaccel_select="mpeg2video_decoder" mpeg2_vdpau_hwaccel_select="vdpau mpeg2video_decoder" mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder" mpeg4_crystalhd_decoder_select="crystalhd" @@ -1807,8 +1808,8 @@ mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder" mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder" msmpeg4_crystalhd_decoder_select="crystalhd" vc1_crystalhd_decoder_select="crystalhd" -vc1_dxva2_hwaccel_deps="dxva2api_h" -vc1_dxva2_hwaccel_select="dxva2 vc1_decoder" +vc1_dxva2_hwaccel_deps="dxva2" +vc1_dxva2_hwaccel_select="vc1_decoder" vc1_vaapi_hwaccel_select="vaapi vc1_decoder" vc1_vdpau_decoder_select="vdpau vc1_decoder" wmv3_crystalhd_decoder_select="crystalhd" diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index a851fbcf07..e9365180f8 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -40,6 +40,10 @@ static void free_buffers(VP8Context *s) int i; if (s->thread_data) for (i = 0; i < MAX_THREADS; i++) { +#if HAVE_THREADS + pthread_cond_destroy(&s->thread_data[i].cond); + pthread_mutex_destroy(&s->thread_data[i].lock); +#endif av_freep(&s->thread_data[i].filter_strength); av_freep(&s->thread_data[i].edge_emu_buffer); } diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index d0511f1582..9329b483a4 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -398,7 +398,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst acodec = astream ? astream->codec : NULL; vcodec = vstream ? vstream->codec : NULL; - if (amf_type == AMF_DATA_TYPE_NUMBER) { + if (amf_type == AMF_DATA_TYPE_NUMBER || amf_type == AMF_DATA_TYPE_BOOL) { if (!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE; else if (!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0)) @@ -415,10 +415,18 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst flv_set_video_codec(s, vstream, num_val, 0); } else if (!strcmp(key, "audiocodecid") && acodec) { - flv_set_audio_codec(s, astream, acodec, num_val); + int id = ((int)num_val) << FLV_AUDIO_CODECID_OFFSET; + flv_set_audio_codec(s, astream, acodec, id); } else if (!strcmp(key, "audiosamplerate") && acodec) { acodec->sample_rate = num_val; + } else if (!strcmp(key, "audiosamplesize") && acodec) { + acodec->bits_per_coded_sample = num_val; + } else if (!strcmp(key, "stereo") && acodec) { + acodec->channels = num_val + 1; + acodec->channel_layout = acodec->channels == 2 ? + AV_CH_LAYOUT_STEREO : + AV_CH_LAYOUT_MONO; } else if (!strcmp(key, "width") && vcodec) { vcodec->width = num_val; |