[FFmpeg-devel] [PATCH] latmenc: Check for LOAS sync word
James Almer
jamrial at gmail.com
Fri Jan 11 20:50:49 CET 2013
On 08/01/13 3:14 PM, James Almer wrote:
> Write the packet unaltered if found.
>
> Fixes ticket #1917
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavformat/latmenc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
> index 233eab8..b882382 100644
> --- a/libavformat/latmenc.c
> +++ b/libavformat/latmenc.c
> @@ -149,7 +149,7 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
> int i, len;
> uint8_t loas_header[] = "\x56\xe0\x00";
>
> - if (s->streams[0]->codec->codec_id == AV_CODEC_ID_AAC_LATM)
> + if (pkt->size > 2 && pkt->data[0] == 0x56 && (pkt->data[1] >> 4) == 0xe)
> return ff_raw_write_packet(s, pkt);
>
> if (pkt->size > 2 && pkt->data[0] == 0xff && (pkt->data[1] >> 4) == 0xf) {
Ping.
More information about the ffmpeg-devel
mailing list