Hi all, I am reading a lot this example lately and I have a question that I cannot quite answer myself. Here is the deal ( https://www.ffmpeg.org/doxygen/2.4/filtering__audio_8c_source.html#l00182), in print_frame there is a cast to uint16_t:
const uint16_t *p = (uint16_t*)frame->data <https://www.ffmpeg.org/doxygen/2.4/structAVFrame.html#a1d0f65014a8d1bf78cec8cbed2304992> [0]; however the filtering description is set with s16: static const char *filter_descr <https://www.ffmpeg.org/doxygen/2.4/filtering__audio_8c.html#a84b31b94c024a45c4bcebd875a54e73d> = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono"; Now I tried to change the cast to int16_t instead of uint16_t and I have no audible change in the filtered stream when played back by ffplay (ffplay -f s16le -ar 8000 -ac 1 -). My question is, when casting signed to unsigned, is there any possibility that the signal gets modified due to the 2-complementation (or are the samples always positive somehow) ?
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
