]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mp3_header_decompress_bsf.c
parse aac extradata to fetch channels and sample rate, patch from Netgem
[ffmpeg] / libavcodec / mp3_header_decompress_bsf.c
index bec38586344431af5b2a1826f4f4b9dc3d6f2637..d897ed985268a2eb9eaa0b61ad01ce1d137084f9 100644 (file)
@@ -60,7 +60,7 @@ static int mp3_header_decompress(AVBitStreamFilterContext *bsfc, AVCodecContext
             break;
     }
     if(bitrate_index == 30){
-        av_log(avctx, AV_LOG_ERROR, "couldnt find bitrate_index\n");
+        av_log(avctx, AV_LOG_ERROR, "Could not find bitrate_index.\n");
         return -1;
     }
 
@@ -84,10 +84,7 @@ static int mp3_header_decompress(AVBitStreamFilterContext *bsfc, AVCodecContext
         }
     }
 
-    (*poutbuf)[0]= header>>24;
-    (*poutbuf)[1]= header>>16;
-    (*poutbuf)[2]= header>> 8;
-    (*poutbuf)[3]= header    ;
+    AV_WB32(*poutbuf, header);
 
     return 1;
 }