diff options
Diffstat (limited to 'apps/metadata/rm.c')
-rw-r--r-- | apps/metadata/rm.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/apps/metadata/rm.c b/apps/metadata/rm.c index 4be0de647f..c74acef5dd 100644 --- a/apps/metadata/rm.c +++ b/apps/metadata/rm.c | |||
@@ -160,24 +160,32 @@ static inline int real_read_audio_stream_info(int fd, RMContext *rmctx) | |||
160 | skipped += 1; | 160 | skipped += 1; |
161 | } | 161 | } |
162 | 162 | ||
163 | read_uint32be(fd, &rmctx->extradata_size); | ||
164 | skipped += 4; | ||
165 | read(fd, rmctx->codec_extradata, rmctx->extradata_size); | ||
166 | skipped += rmctx->extradata_size; | ||
167 | switch(fourcc) { | 163 | switch(fourcc) { |
168 | case FOURCC('c','o','o','k'): | 164 | case FOURCC('c','o','o','k'): |
169 | rmctx->codec_type = CODEC_COOK; | 165 | rmctx->codec_type = CODEC_COOK; |
166 | read_uint32be(fd, &rmctx->extradata_size); | ||
167 | skipped += 4; | ||
168 | read(fd, rmctx->codec_extradata, rmctx->extradata_size); | ||
169 | skipped += rmctx->extradata_size; | ||
170 | break; | 170 | break; |
171 | 171 | ||
172 | case FOURCC('r','a','a','c'): | 172 | case FOURCC('r','a','a','c'): |
173 | case FOURCC('r','a','c','p'): | 173 | case FOURCC('r','a','c','p'): |
174 | rmctx->codec_type = CODEC_AAC; | 174 | rmctx->codec_type = CODEC_AAC; |
175 | read_uint32be(fd, &rmctx->extradata_size); | ||
176 | skipped += 4; | ||
177 | read(fd, rmctx->codec_extradata, rmctx->extradata_size); | ||
178 | skipped += rmctx->extradata_size; | ||
179 | break; | ||
180 | |||
181 | case FOURCC('d','n','e','t'): | ||
182 | rmctx->codec_type = CODEC_AC3; | ||
175 | break; | 183 | break; |
176 | 184 | ||
177 | default: /* Not a supported codec */ | 185 | default: /* Not a supported codec */ |
178 | return -1; | 186 | return -1; |
179 | } | 187 | } |
180 | 188 | ||
181 | DEBUGF(" flavor = %d\n",flavor); | 189 | DEBUGF(" flavor = %d\n",flavor); |
182 | DEBUGF(" coded_frame_size = %ld\n",coded_framesize); | 190 | DEBUGF(" coded_frame_size = %ld\n",coded_framesize); |
183 | DEBUGF(" sub_packet_h = %d\n",rmctx->sub_packet_h); | 191 | DEBUGF(" sub_packet_h = %d\n",rmctx->sub_packet_h); |
@@ -407,6 +415,10 @@ bool get_rm_metadata(int fd, struct mp3entry* id3) | |||
407 | case CODEC_AAC: | 415 | case CODEC_AAC: |
408 | id3->codectype = AFMT_RM_AAC; | 416 | id3->codectype = AFMT_RM_AAC; |
409 | break; | 417 | break; |
418 | |||
419 | case CODEC_AC3: | ||
420 | id3->codectype = AFMT_RM_AC3; | ||
421 | break; | ||
410 | } | 422 | } |
411 | 423 | ||
412 | id3->bitrate = rmctx->bit_rate / 1000; | 424 | id3->bitrate = rmctx->bit_rate / 1000; |