int got_frame, got_packet_ptr;
AVFrame *frame = av_frame_alloc();
char layout_buf[100];
+ uint8_t *d;
ictx = as->aud_ictx;
octx = as->aud_octx;
if (!avcodec_is_open(ictx)) {
if (icodec->id == AV_CODEC_ID_AAC || icodec->id == AV_CODEC_ID_VORBIS) {
- if (ts->ts_input_gh) {
+ d = pktbuf_ptr(pkt->pkt_payload);
+ if (icodec->id == AV_CODEC_ID_AAC && d && pktbuf_len(pkt->pkt_payload) > 2 &&
+ d[0] == 0xff && (d[1] & 0xf0) == 0xf0) {
+ /* DTS packets have all info */
+ } else if (ts->ts_input_gh) {
ictx->extradata_size = pktbuf_len(ts->ts_input_gh);
ictx->extradata = av_malloc(ictx->extradata_size);
memcpy(ictx->extradata,
pktbuf_ptr(ts->ts_input_gh), pktbuf_len(ts->ts_input_gh));
+ tvhtrace(LS_TRANSCODE, "%04X: copy meta data for %s (len %zd)",
+ shortid(t), icodec->id == AV_CODEC_ID_AAC ? "AAC" : "VORBIS",
+ pktbuf_len(ts->ts_input_gh));
} else {
tvherror(LS_TRANSCODE, "%04X: missing meta data for %s",
shortid(t), icodec->id == AV_CODEC_ID_AAC ? "AAC" : "VORBIS");
ictx->extradata = av_malloc(ictx->extradata_size);
memcpy(ictx->extradata,
pktbuf_ptr(ts->ts_input_gh), pktbuf_len(ts->ts_input_gh));
- } else {
- tvherror(LS_TRANSCODE, "%04X: missing meta data for H264", shortid(t));
+ tvhtrace(LS_TRANSCODE, "%04X: copy meta data for H264 (len %zd)",
+ shortid(t), pktbuf_len(ts->ts_input_gh));
}
}