framecrcenc: print all side data elements, not just the first
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		@@ -34,11 +34,15 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
 | 
				
			|||||||
    if (pkt->flags != AV_PKT_FLAG_KEY)
 | 
					    if (pkt->flags != AV_PKT_FLAG_KEY)
 | 
				
			||||||
        av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
 | 
					        av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
 | 
				
			||||||
    if (pkt->side_data_elems) {
 | 
					    if (pkt->side_data_elems) {
 | 
				
			||||||
        uint32_t side_data_crc = av_adler32_update(0,
 | 
					        int i;
 | 
				
			||||||
                                                   pkt->side_data->data,
 | 
					 | 
				
			||||||
                                                   pkt->side_data->size);
 | 
					 | 
				
			||||||
        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
 | 
					        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
 | 
				
			||||||
        av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08x", pkt->side_data->size, side_data_crc);
 | 
					
 | 
				
			||||||
 | 
					        for (i=0; i<pkt->side_data_elems; i++) {
 | 
				
			||||||
 | 
					            uint32_t side_data_crc = av_adler32_update(0,
 | 
				
			||||||
 | 
					                                                    pkt->side_data[i].data,
 | 
				
			||||||
 | 
					                                                    pkt->side_data[i].size);
 | 
				
			||||||
 | 
					            av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08x", pkt->side_data[i].size, side_data_crc);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    av_strlcatf(buf, sizeof(buf), "\n");
 | 
					    av_strlcatf(buf, sizeof(buf), "\n");
 | 
				
			||||||
    avio_write(s->pb, buf, strlen(buf));
 | 
					    avio_write(s->pb, buf, strlen(buf));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user