| 837 | } |
| 838 | |
| 839 | static int parse_xch_frame(DCACoreDecoder *s) |
| 840 | { |
| 841 | int ret; |
| 842 | |
| 843 | if (s->ch_mask & DCA_SPEAKER_MASK_Cs) { |
| 844 | av_log(s->avctx, AV_LOG_ERROR, "XCH with Cs speaker already present\n"); |
| 845 | return AVERROR_INVALIDDATA; |
| 846 | } |
| 847 | |
| 848 | if ((ret = parse_frame_data(s, HEADER_XCH, s->nchannels)) < 0) |
| 849 | return ret; |
| 850 | |
| 851 | // Seek to the end of core frame, don't trust XCH frame size |
| 852 | if (ff_dca_seek_bits(&s->gb, s->frame_size * 8)) { |
| 853 | av_log(s->avctx, AV_LOG_ERROR, "Read past end of XCH frame\n"); |
| 854 | return AVERROR_INVALIDDATA; |
| 855 | } |
| 856 | |
| 857 | return 0; |
| 858 | } |
| 859 | |
| 860 | static int parse_xxch_frame(DCACoreDecoder *s) |
| 861 | { |
no test coverage detected