[FFmpeg-devel] [PATCH] check that incoming data is identified as H.264
Diego Biurrun
diego
Sun Feb 27 10:25:02 CET 2011
On Sat, Feb 26, 2011 at 03:28:16PM -0500, Sean McGovern wrote:
> ---
> libavcodec/h264_mp4toannexb_bsf.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
> index d4a7f31..6b5ecb9 100644
> --- a/libavcodec/h264_mp4toannexb_bsf.c
> +++ b/libavcodec/h264_mp4toannexb_bsf.c
> @@ -71,6 +71,12 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
>
> + /* ensure incoming data is H.264 */
> + if(avctx->codec_id != CODEC_ID_H264 ||
> + avctx->codec_tag != AV_RL32("avc1")) {
"if (" and indentation is messed up.
> @@ -114,7 +120,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
>
> - memset(out + total_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
> + if(out) memset(out + total_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
"if (", put the memset on a line of its own.
Diego
More information about the ffmpeg-devel
mailing list