Skip to content

Commit

Permalink
handle E-AC3 streams with AC3 core stream correctly (as defined in HD…
Browse files Browse the repository at this point in the history
…MI AC3 spec)
  • Loading branch information
DanielaE committed Apr 23, 2012
1 parent 21b156a commit 01a8b7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ffmpeg/libavformat/spdifenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ static int spdif_header_eac3(AVFormatContext *s, AVPacket *pkt)
static const uint8_t eac3_repeat[4] = {6, 3, 2, 1};
int repeat = 1;

if ((pkt->data[4] & 0xc0) != 0xc0) /* fscod */
if (((pkt->data[5] & 0xF8) >= 0x58) && /* E-AC3 */
((pkt->data[4] & 0xc0) != 0xc0)) /* fscod */
repeat = eac3_repeat[(pkt->data[4] & 0x30) >> 4]; /* numblkscod */

ctx->hd_buf = av_fast_realloc(ctx->hd_buf, &ctx->hd_buf_size, ctx->hd_buf_filled + pkt->size);
Expand Down

0 comments on commit 01a8b7b

Please sign in to comment.