Commit cac0a56c authored by Roman Shaposhnik's avatar Roman Shaposhnik

* .mov files with uncompressed audio can't be correctly processed

      because of the sample_size == 1 and MINOLTA hack relying on
      the information. So in a way, it's a hack of a hack.

      btw, if somebody knows why in the world even Apple's software
      thinks that for PCM 16bit sample_size == 1 please let me know.
      It clearly isn't documented that way.

Originally committed as revision 2941 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 58c2182d
...@@ -1676,7 +1676,13 @@ again: ...@@ -1676,7 +1676,13 @@ again:
for(i=0; i<(sc->sample_to_chunk_sz); i++) { for(i=0; i<(sc->sample_to_chunk_sz); i++) {
if( (sc->sample_to_chunk[i].first)<=(sc->next_chunk) && (sc->sample_size>0) ) if( (sc->sample_to_chunk[i].first)<=(sc->next_chunk) && (sc->sample_size>0) )
{ {
foundsize=sc->sample_to_chunk[i].count*sc->sample_size; // I can't figure out why for PCM audio sample_size is always 1
// (it should actually be channels*bits_per_second/8) but it is.
AVCodecContext* cod = &s->streams[sc->ffindex]->codec;
if (sc->sample_size == 1 && (cod->codec_id == CODEC_ID_PCM_S16BE || cod->codec_id == CODEC_ID_PCM_S16LE))
foundsize=(sc->sample_to_chunk[i].count*cod->channels*cod->bits_per_sample)/8;
else
foundsize=sc->sample_to_chunk[i].count*sc->sample_size;
} }
#ifdef DEBUG #ifdef DEBUG
/*printf("sample_to_chunk first=%ld count=%ld, id=%ld\n", sc->sample_to_chunk[i].first, sc->sample_to_chunk[i].count, sc->sample_to_chunk[i].id);*/ /*printf("sample_to_chunk first=%ld count=%ld, id=%ld\n", sc->sample_to_chunk[i].first, sc->sample_to_chunk[i].count, sc->sample_to_chunk[i].id);*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment